|
| sl02ggp (25) | |||
| I have my program below (it runs and compiles as is) , but having difficulty implement these conditions and outputs: conditions: 1. rejecting certain coefficients if the discriminat (B^(2) -4AC) <0. 2. also having no division by zero in my program (do i use setPrecision)? outputs: having at least 15 spaces or so for each of the root ouput and outputting the roots in the following format: -right justified, four decimal places accuracy, fixed point format -right justified, two decimal places accuracy, floating point (scientific) format - left justified, four decimal places accuracy, fixed point format - left justified, two decimal places accuracy, floating point (scientific) format
| |||
| sl02ggp (25) | |
| also decided to use cout and cin instead of printf. how would I also implement these cout and cin into my code along with the outputs and conditions? | |
| sl02ggp (25) | |||
this is what I have now: changed it so its cout and cin
| |||
Last edited on | |||
| sl02ggp (25) | |
| any assistance with this? how to implement these: conditions: 1. rejecting certain coefficients if the discriminat (B^(2) -4AC) <0. 2. also having no division by zero in my program (do i use setPrecision)? outputs: having at least 15 spaces or so for each of the root ouput and outputting the roots in the following format: -right justified, four decimal places accuracy, fixed point format -right justified, two decimal places accuracy, floating point (scientific) format - left justified, four decimal places accuracy, fixed point format - left justified, two decimal places accuracy, floating point (scientific) format | |
| firedraco (2048) | |
| 1.) Check that condition and then do whatever based on it 2.) Same as #1, check if a == 0. For the other stuff, read up on iostream manipulators like setPrecision(). | |
Last edited on | |
Registered users can post in this forum.
