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?
Programming Problems! Help!
Moderators:Administrator, Global Moderator
Re: Programming Problems! Help!
1) add a NEXT statement.
2) You may have a GOTO that doesn't let the computer know that it HAS passed a Next statement
3) to paste your code:
a) save your code as a text file
b) use NOTEPAD to open the BAS file you just saved.
c) while notepad is open, come back to this site and paste it from notepad.
2) You may have a GOTO that doesn't let the computer know that it HAS passed a Next statement
3) to paste your code:
a) save your code as a text file
b) use NOTEPAD to open the BAS file you just saved.
c) while notepad is open, come back to this site and paste it from notepad.
- frankiebaby
- Global Moderator
- Posts:95
- Joined:Tue Apr 30, 2002 1:38 am
- Location:Pennsylvania
- Contact:
Re: Programming Problems! Help!
another way to copy :
press alt-enter to make the box a window and press the little dashed-square button. (win9x) then select the text you want. then press the copy button, or press ctrl-C. Downfall is, does not scroll down for you. Good point, can paste grafix + text into MSPaint or other graphics editors. For winXP and i think ME, just press alt-enter and drag mouse on the screen. then right click to copy.
press alt-enter to make the box a window and press the little dashed-square button. (win9x) then select the text you want. then press the copy button, or press ctrl-C. Downfall is, does not scroll down for you. Good point, can paste grafix + text into MSPaint or other graphics editors. For winXP and i think ME, just press alt-enter and drag mouse on the screen. then right click to copy.