Cod sursa(job #2029675)

Utilizator cont_nouCont Nou cont_nou Data 30 septembrie 2017 12:39:04
Problema Tablete Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.43 kb
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("tablete.in");
ofstream fout("tablete.out");
int main()
{
    int N,K,a[100][100],p=2,c=1,i,j;
    fin>>N>>K;
    for(i=1;i<=N;i++)
        for(j=1;j<=N;j++)
    {
        a[i][j]=c;
        c++;
    }

    for(i=1;i<=N;i++)
        {
        for(j=1;j<=N;j++)
            fout<<a[i][j]<<" ";
        fout<<"\n";
        }

    return 0;
}