//setw() specifies a field width in which to display 
//a value returned by an expression passed to cout or 
//another ostream variable. By default, excess space is 
//filled with spaces, so it works well to add white 
//space to a report.
//Be sure to include iomanip.
cout << setw(8) << x;