Thursday, July 30, 2009

C++ programming?

write a C++ program to decide if the coefficients of a quadratic equation have real roots. The three choices will be to write the message “zero divide” when A is zero, write the message “no real roots” if the discriminant is negative and find the two roots when there is no error condition. DO NOT FIND THE ROOT IF THERE IS AN ERROR CONDITION.


use a NESTED DECISION to do the three parts of the algorithm above.


write a sentinel-controlled loop based on a character value to control the loop, q or Q will terminate the loop, any other value will continue processing. Read the value from the keyboard and write to the monitor. Use the inputs given below.


4. document the program properly, Use format for both the roots. Be sure to set the iosflags, setprecision, and showpoint. Use a setprecision of 3. also use setw for each numeric output.


libraries needed: iostream, cmath, iomanip. Add the .h, math.h for other compilers

C++ programming?
You forgot to post the question you wanted answered, you only posted your assignment.
Reply:Carefull. Last time she posted and I asked where the question was, she reported it. :)


No comments:

Post a Comment