Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main()
- {
- const int arrSizeY{ 3 };
- const int arrSizeX{ 4 };
- // arr [ [0 - [0][1][2][3] ] [1 - [0][1][2][3] ] [2 - [0][1][2][3]] ]
- int arr[arrSizeY][arrSizeX]{ {1,2,3,4},{5,6,7,8},{9,10,11,12} };
- for (int y{ 0 }; y < arrSizeY; ++y)
- {
- for (int x{ 0 }; x < arrSizeX; ++x)
- {
- std::cout << arr[y][x] << '\t';
- }
- std::cout << '\n';
- }
- //for (int i{ 0 }; i < arrSize; ++i) { std::cout << arr[i] << ' '; } std::cout << '\n';
- }
Advertisement
Add Comment
Please, Sign In to add comment