How to show the '0' after '.'?
Moderator: Board moderators
How to show the '0' after '.'?
How to show 3.00000 rather than 3?
Code: Select all
printf("%.5f\n", 3.0);
Code: Select all
cout.setf(ios::fixed);
cout.precision(5);
cout << 3.0 << endl;