+ 9
Problem in setting preision..
Why the precision goes wrongly?? https://code.sololearn.com/cS909f0REo1Y/?ref=app
7 odpowiedzi
+ 9
You are writing cout.precision(2);
It is printing first 2 digits instead of it write cout.precision(4);.
It will print 4 digits.
+ 7
~swim~ Thank you
+ 7
I want two digits after decimal point,,it works in computer but not in mobile,,I don't know why🙄🙄 Yamin Mansuri
+ 3
Vivek Raj do it this way :
https://code.sololearn.com/cq5BWPlWwMs2/?ref=app
+ 2
The precision take in consideration also the number before dot. In your case you should put precision(4) if you want 2 numbers after dot