Skip to content

Instantly share code, notes, and snippets.

@invatainfo
Created September 16, 2017 15:01
#include <conio.h>
#include <iostream.h>
void main() {
int n, m, k = 1, i, j;
cin >> m >> n;
int a[25][25];
k = m * n;
for (i = 1; i <= m; i++)
for (j = 1; j <= n; j++)
a[i][j] = k--;
for (i = 1; i <= m; i++) {
for (j = 1; j <= n; j++)
cout << a[i][j] << " ";
cout << endl;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment