|
Post by Vitamin on Oct 10, 2002 6:28:10 GMT
i am making a neato prog for math class that will do my home work, i want it do "FOIL" F=First O=outside I=inside L=last in the equation (X + 3)(X+5) i want it to come up with X^2 + 8X + 15
the code i put in is
SUB inter2 PRINT "...Welcome To The Intergrated 2 Math Portion..." PRINT "Functions: 1. FOIL " INPUT "Choice: ", f#
IF f# = 1 THEN PRINT "( X1 , Y1 )( X2 , Y2 )" IF f# = 1 THEN INPUT "What is in front of X1? ", b1# IF f# = 1 THEN INPUT "What is value of Y1?", a1# IF f# = 1 THEN INPUT "What is in front of X2? ", b2# IF f# = 1 THEN INPUT "What is value of Y2?", a2# [glow=red,2,300] IF f# = 1 THEN b1 * a1= x1*y1 if f# = 1 then b1 * a2 = x1*y2 if f# = 1 then a1 * b2 = y1*x2 if f# = 1 then a1 * y2 = y1*y2 [/glow] IF f# > 1 THEN PRINT "***Invalid Option***" IF f# > 1 THEN INPUT "Please Select 1: ", f# END SUB
the glowing part is the problem, it highlights the first * in each line when scrolling thru them and says "Expected: End-Of-Statement"
please help, i have promoted it at school and people are willing to buy it once i get it done, and this is nessicary in my prog.....
|
|
|
Post by Vitamin on Oct 10, 2002 7:00:34 GMT
Whoo hoo! nm guys, i got it figured out.... ;D ;D ;D ;D ;D ;D ;D ;D PARTY TIME!
|
|
|
Post by Akos on Oct 10, 2002 12:12:16 GMT
|
|
|
Post by vitamin on Oct 10, 2002 17:21:42 GMT
ya my math teacher said if he liked it (was previously a engineer and knows a ton of code, that and hes a math genious) he would advertise it in his classes and give me the money
|
|
Ziggi
Full Member
Posts: 87
|
Post by Ziggi on Oct 11, 2002 4:12:40 GMT
First of all the logic in your program is false. Statements from IF section checking for the same condition cause checking if f# =1 no other value. So I don’t know how your program can work efficiently ?
|
|