Assuming that weight has type double and value 126.7, and age has type int and value 26, what output is generated by the statement below?
cout << "Age: " << setw(3) << age << ", Weight: " << setw(8)
<< fixed << setprecision(2) << weight << endl;
Output :
Age : 26, Weight : 126.70
Comments
Leave a comment