It was assumed that all output would be formatted using the default settings. This portion uses a construct not covered yet, namely, a for statement. The for statement is used for implementing loops and will be covered later. It is possible to achieve this degree of control on the output format by using output manipulators . Before looking at manipulators scientific notation for the display of floating point numbers is considered.
Scientific notation allows very large or very small numbers to be written in a more convenient form.
Thus a number like 67453000000000000 is better written as and a number like 0.0000000000001245 is better written as . On output, if a number is too large to display in six digits then scientific notation will be used by default. These flags remain in effect until explicitly changed. Another useful manipulator is the setprecision manipulator, this takes one parameter which indicates the number of decimal places of accuracy to be printed. This accuracy remains in effect until it is reset.