Cod sursa(job #2604701)
| Utilizator | Data | 23 aprilie 2020 12:11:42 | |
|---|---|---|---|
| Problema | Tablete | Scor | 10 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.4 kb |
#include <fstream>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
ifstream fin("tablete.in");
ofstream fout("tablete.out");
int n, k, l, c;
fin >> n >> k;
for (l=0; l<n; l++) {
for (c=1; c<=n; c++) {
fout << l*n+c << ' ';
}
fout << '\n';
}
fin.close();
fout.close();
return 0;
}