Programming Problems! Help!
Posted: Tue May 06, 2003 5:34 am
OK guys, first of all thanks for click on this thread. I never find it fun to help people, so thanks for contributing your time. Here is my program so far, done in QB 7.1. If anyone remembers this from math class, this is the Quadratic Equation formula, for solving things like x(squared) + 100x -18 = 0. With a being 1, b being 100, and c being -18. Now instead of doing this on my calculator which would take quite a while, i decided to do it in qb. The full formula is x = -b (plus or minus) (the square root of b[squared] -4ac) ALL OF THAT over 2a. Here is my program so far. I was planning on using a variable for each and every single step, just slowly going down the line. Now since you have the plus or minus part, you should get two answers when u are finished. This means that i had to either do a lot of copying and pasting and sticking in a * -1, or i could do it with a do while/when loop so it could the program over until it did it twice. I had two big IF THEN statements, if the loop was on its first lap it would do the + part of the plus or minus, if it was on the second lap it would do the minus part of the plus or minus. Here is the code, kinda confusing but oh well. Im a beginning, go easy :)
oh crap, it wont copy or paste. Anyways, my problem was that i got error messages saying the there was a FOR but not a NEXT. Anyone have any ideas?
oh crap, it wont copy or paste. Anyways, my problem was that i got error messages saying the there was a FOR but not a NEXT. Anyone have any ideas?