Decimals - please help

I have to create a converter but the results must be in 4 decimal places just like, if i Entered 5000mm the result would be 500.0000cm . what should I do ? I used Float function
Last edited on
double cm = mms/mmInCms;
	cout << setprecision(4) << cm;
Topic archived. No new replies allowed.