Visual Basic/Visual basic

Advertisement


Question
I have just made a program on Visual Basic that factors out trinomials. My only problem is it takes random numbers and plugs them in to try to find the four different numbers it needs. I was wondering if there was a way that I could make it so when to script tried one set of four, it would not try that set and again. If you could help that would be greatly appreciated!

Answer
Dear John,

You need to save a list of 4 numbers which already were tried. One way is to create the new array, and save first 4 numbers into it. Then select next 4 numbers, check are those 4 numbers in your array: if yes, go to next 4 numbers. If no, try current 4 numbers than add them to the array as new entry. Select next 4 numbers etc.

Sincerely,

Vitaly

Visual Basic

All Answers


Answers by Expert:


Ask Experts

Volunteer


VITALY

Expertise

Area of expertise is Visual Basic .NET (VS 2008 and Framework 3.5) design and development for Windows applications. You can ask me any Visual Basic questions and some questions about .NET Framework. You can also ask me how to use Component One controls in Visual Basic. Do not ask me questions about Web design and development in Visual Basic.

Experience

I'm working as VB programmer from 1997, so I have a lot of experience with Visual Basic .NET as well as Visual Basic 6. Area of expertise is Visual Basic .NET (VS 2008 and Framework 3.5) design and development for Windows applications; Component One controls for Visual Basic; User controls; Moving VB6 applications to .NET.

Education/Credentials
B.S. in Computer Science

©2016 About.com. All rights reserved.