Cod sursa(job #2058546)
Utilizator | Data | 5 noiembrie 2017 19:21:33 | |
---|---|---|---|
Problema | Tablete | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.39 kb |
#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;
}