9x9 Multiplication Table

  1. Consider the following program which will print a simple 9x9 multiplication table.
    
    #include 
    using std::cout;
    using std::endl;
    
    int main()
    {
        int i, j;
        for (i=1; i<=9; i++)
            for (j=1; j<=9; j++)
                cout << i << '*' << j << '=' << i*j << endl;
        return 0;
    }
    
    
  2. Try to modify the above program and format the output as 3 by 3 blocks as below.
  3. Try to right-justify the products. Submit this version as the homework.