Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (17 sloc) 285 Bytes
#include <cstdio>
int main() {
int n, k = 1;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
printf("%d", k);
if (j == n - 1) {
printf("\n");
} else {
printf(" ");
k += 4;
}
}
}
return 0;
}