Site icon Bytefreaks.net

C++: How to set presission/decimal places to float numbers

Advertisements

fout << setiosflags(ios::fixed) << setprecision(Digits) << Height << endl;

Where Digits is the number of decimal places.
Height is a float value. 

This post is also available in: Αγγλικα

Exit mobile version