Created
June 25, 2017 17:15
-
-
Save catharsis96/dd48292a2c7d0671de33fe2c4ac73781 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <iomanip> | |
using namespace std; | |
const unsigned int DIM1 = 3; | |
const unsigned int DIM2 = 5; | |
int ary[DIM1][DIM2]; | |
int main() { | |
for (int i = 0; i < DIM1; i++) { | |
for (int j = 0; j < DIM2; j++) { | |
ary[i][j] = (i + 1) * 10 + (j + 1); | |
} | |
} | |
for (int i = 0; i < DIM1; i++) { | |
for (int j = 0; j < DIM2; j++) { | |
cout << setw(4) << ary[i][j]; | |
} | |
cout << endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment