Skip to content

Instantly share code, notes, and snippets.

@invatainfo
Created September 21, 2017 09:31
Show Gist options
  • Save invatainfo/247fe379c2bd3646f1d63d3f55be91fd to your computer and use it in GitHub Desktop.
Save invatainfo/247fe379c2bd3646f1d63d3f55be91fd to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main() {
int n,a[25][25],i,j;
cin >> n;
for (i = 1; i <= n; i++)
for (j = 1; j <= n; j++)
a[i][j] = (i * j) % 10;
for (i = 1; i <= n; i++) {
for (j = 1; j <= n; j++)
cout << a[i][j] << " ";
cout << '\n';
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment