From 85d220cdadb06ad66edfa4a8addcb67e2d5d4e2c Mon Sep 17 00:00:00 2001 From: Yana Blashchishina Date: Thu, 15 Feb 2024 19:09:14 -0800 Subject: exercise completed --- InClassExercise11/InClassExercise11/main.cpp | 26 ++++++++++++++++++++++++-- 1 file 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 +#include +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 -- cgit v1.2.3