Question
Write a program for the calculator TI-83 that does the following:It displays AX2 +BX+C=0 and then asks the user for A, B,and C. It then determines the number and teh nature of teh roots ofthe equation (probably using teh discriminant: B2-4AC).The program the displays the number of real roots, and whether theywill be rational or not. Remember: if teh discriminant isnegative, there are no real roots. If it is zero, then there is onerational double root. If it is positive, there are two roots. If itis a perfect square, the roots are rational.
Explanation / Answer
Here is what it should look like: :Prompt A,B,C :B2-4AC --> D :If D<0 :then :Disp "NO REAL ROOTS, 2 COMPLEX SOLUTIONS",(-B-D)i)/(2A), (-B+ -D)i)/(2A) :STOP :END :If D = 0 :Then :Disp "1 RATIONAL DOUBLE ROOT," -B/(2A) :Else :Disp "2 REAL ROOTS", (-B + D))/(2A), (-B -D))/(2A) :End By the way, the words inside the quotes are just the wordsthat will show up on your calculator, so you can change them if youwish.