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
This note was uploaded on 09/06/2013 for the course COMPUTING FE1008 taught by Professor Johnarnold during the Fall '11 term at Mapúa Institute of Technology.
- Fall '11