View Code of Problem 45

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

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

    cin >> a;
    for(int i=1;i<a;i++)
    {
        cin >> b;
        for(int n=0;n<a;n++)
        {
            cin >> c;
        }
    }

    for(int m=1; m<=a;m++)
    {
        cout << b++<< " ";
        for(int d=1; d<a;d++)
        {
            cout << c++<< " " ;
        }
        cout <<endl ;
    }


    return 0;
}

Double click to view unformatted code.


Back to problem 45