View Code of Problem 45

#include <iostream>
#include <iomanip>
#include <cmath>

using namespace std;
int main( )
{
    int a;

    cin >> a;
    for(int i=1; i<a;i++)
    {
        cout << i<< " ";
        for(int b=1; b<a;b++)
        {
            cout << i<< " " ;
        }
        cout <<endl ;
    }


    return 0;
}

Double click to view unformatted code.


Back to problem 45