Originally posted by: Crusty
result = ((-b + sqrt(b*b - 4*a*c))) / (2 * a)
result2 = ((-b - sqrt(b*b - 4*a*c))) / (2 * a)
0 PRINT "Enter a,b and c"
1 SLEEP 1
2 INPUT "A:"; a
3 INPUT "B:"; b
4 INPUT "C:"; c
5 PRINT "X is"; ((-b + ((b * b - 4 * a * c) ^ .5))) / (2 * a)
6 PRINT "and"; ((-b - ((b * b - 4 * a * c) ^ .5))) / (2 * a)
Originally posted by: matas
Originally posted by: Crusty
result = ((-b + sqrt(b*b - 4*a*c))) / (2 * a)
result2 = ((-b - sqrt(b*b - 4*a*c))) / (2 * a)
Does not work. I get Run-time error '5': Invalid procedure call or argument
ChristianV, programs asks a , b, and c as an input. A program plugs in those numbers in a formula and solves it
More info about program:
Check the discriminate. If it is < 0, then there are no real roots
If = 0, then there is a double root.
What the hell is discriminate?