0
How can I make the output be 14.45 when the input is 3 because the output right now is 14.445?
Here is the code: https://code.sololearn.com/chSr4MpAZc07/?ref=app
7 ответов
+ 1
You could round the result
+ 1
***round the number***
or
format the output string
0
Lisa, Wdym?
0
Lisa
Ooh, I understand!
The only problem is that i only know the function 'ceil(varr)' but this one rounds up the number.
I only want to round up the second positions after the coma. How?
0
Have you tried to solve this by Googling for approaches?
I found this for instance:
https://www.geeksforgeeks.org/rounding-floating-point-number-two-decimal-places-c-c/
0
Alright thx alot
0
change the second factor 7/100 for 29/270