When there are several cout statements, if the first cout statement has, say, << fixed << showpoint << setprecision(4), then all the subsequent cout statements *without* these settings will also have that effect. For example, in the following program,
cout << "sin(" << angle << ") = " << fixed << showpoint << setprecision(4) << sin(angle) << endl; cout << angle;
suppose angle = 2. The second angle (last cout) will have four decimals displayed (2.0000):
sin(2) = 0.9093 2.0000
How to "deactivate" the format so that the second angle will display as the first one, i.e. just "2" ? Thanks in advance!