+ 1

Incomplete

I want this code to prompt Fahrenheit degree and then convert to Celsius. https://code.sololearn.com/c681ejEtxY9F/#cpp can you help, please?

11th May 2019, 4:37 PM
Joshua Olaoye
Joshua Olaoye - avatar
7 Réponses
+ 5
"// Configure the display to show monthly income." You didn't even change the comments from a previous code. Laziness level over 9000
11th May 2019, 4:59 PM
Anna
Anna - avatar
+ 1
You use ints to do floating point operation, you code will work by changing to floats: float f = 72 ; cout << "Please enter Fahrenheit degrees:"; cin >> f; float c = 5.0 / 9.0 * (f - 32.0);
11th May 2019, 4:58 PM
Paul
0
I accept my mistake and thank you for the notice
11th May 2019, 6:00 PM
Joshua Olaoye
Joshua Olaoye - avatar
0
Paul, thanks
11th May 2019, 6:00 PM
Joshua Olaoye
Joshua Olaoye - avatar
0
But one more thing, the output is in whole number, but I want it in decimals
11th May 2019, 6:01 PM
Joshua Olaoye
Joshua Olaoye - avatar
0
How do I do that???
11th May 2019, 6:02 PM
Joshua Olaoye
Joshua Olaoye - avatar
0
If you want to have to have more digits after the comma, change the precision value too something else than 0
11th May 2019, 6:08 PM
Paul