+ 2

fixed attribute?

Given: change the instruction: cout << setprecision (2) << fixed << showpoint; to cout << setprecision(2) << showpoint; fixed attribute in the cout statement does?

5th Mar 2017, 2:13 PM
Luke Mai
Luke Mai - avatar
1 Respuesta
0
#include <iomanip> ... cout << setiosflags(ios::showpoint); cout << setiosflags(ios::fixed); cout << setprecision(2); is that what you are talking about? not a very clear question. this will make the number have 2 decimal places. changing the '2' will change the number of decimals
8th Mar 2017, 5:53 AM
Michael Szczepanski
Michael Szczepanski - avatar