Unformatted text preview: line bx+c=0 root at c/b) a=0,b=0 (horizontal line, no roots unless c =0) a=0,b=0,c=0 (infinite roots) Algorithm: Roots of Quadratic Formula Pseudocode
write "Enter the coefficients of the formula:" read a,b,c if a,b,and c equal 0 write "infinite roots" exit if a and b equal 0 write "no roots" exit if a equals 0 root = c/b write "One root at x=", root exit . . . Testing Remember once you've translated your pseudocode into actual code that you need to test every possible case...
View Full Document
- Fall '11
- Quadratic equation, Prime number