diff options
| author | Yana Blashchishina <[email protected]> | 2024-02-15 19:09:14 -0800 |
|---|---|---|
| committer | Yana Blashchishina <[email protected]> | 2024-02-15 19:09:14 -0800 |
| commit | 85d220cdadb06ad66edfa4a8addcb67e2d5d4e2c (patch) | |
| tree | f51baf880e6d12fe914d857a03a96764ebb55288 | |
| parent | pls commit (diff) | |
| download | in-class-exercise-11-yanablash-main.tar.xz in-class-exercise-11-yanablash-main.zip | |
| -rw-r--r-- | InClassExercise11/InClassExercise11/main.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/InClassExercise11/InClassExercise11/main.cpp b/InClassExercise11/InClassExercise11/main.cpp index 877a1ea..4a0d959 100644 --- a/InClassExercise11/InClassExercise11/main.cpp +++ b/InClassExercise11/InClassExercise11/main.cpp @@ -6,14 +6,36 @@ #include <iostream> +#include <ostream> +using std::cout; +using std::endl; -int main() { +const size_t ROW = 3; +const size_t COLUMN = 3; +void Print2DArray() { - +} +int main() { + + int matrix[ROW][COLUMN]{ + {1,2,3}, + {4,5,6}, + {7,8,9} + }; + + for (auto i = 0u; i < ROW; ++i) + { + for (auto j = 0u; j < COLUMN; ++j) + { + cout << matrix[i][j] << " "; + } + cout << endl; + } + cout << endl; return 0; }
\ No newline at end of file |