Skip to content

Instantly share code, notes, and snippets.

@invatainfo
Last active March 26, 2019 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save invatainfo/3eb0d1829adb7df6bef324ebd1558a1f to your computer and use it in GitHub Desktop.
Save invatainfo/3eb0d1829adb7df6bef324ebd1558a1f to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main() {
int a[5][5];
int i, j;
for (i = 0; i < 5; i++) {
for (j = 0; j < 5; j++) {
a[i][j] = 2 * i + j;
}
}
for (i = 0; i < 5; i++) {
for (j = 0; j < 5; j++) {
cout << a[i][j] << " ";
}
cout << endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment