Electrical and Computer Engineering
1 of 52
UAH
CPE 112
Formatting Output
•By default, consecutive integer, floating-point, and string values are output with no spaces between them.
•Manipulators are used to control the horizontal spacing of the output. (endl is one we’ve already seen)
•Manipulators we’ll use now
–endl                   first three defined in iostream
–fixed
–showpoint
–setw                         last two defined in iomanip
–setprecision