Regarding printing prision output in the float

doube k=334.345345366
how to print the same thing

Hey @kailash_01 if you want say x decimal places then you can use.

cout << fixed << setprecision(x) << variable;

So in the given case x would become 9 since there are 9 digits in the decimal place.

cout << fixed << setprecision(9) << k;

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.