The main function for Formatting02

Listing 6 shows the beginning of the main function.

int main(){
  //Print the first row in the table 
  // consisting of two columns.
  cout << setw(10) << setprecision(1) 
                          << fixed << 1.5;
  cout << setw(12) << setprecision(3) 
                  << fixed << 2.2 << endl;

Listing 6

Listing 6 includes the code to print the first row of data in the desired tabular format as shown below.

       1.5       2.200