suppose the input is 100 .If I want the squareroot of this to be printed as 10.00
What modification should I do in following code:
How to get precision after decimal point for a perfect square
@sk1 double pi = 3.14159, npi = -3.14159;
cout << fixed << setprecision(2) << pi << " " <<npi<<endl;
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.