aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYana Blashchishina <[email protected]>2024-02-15 19:09:14 -0800
committerYana Blashchishina <[email protected]>2024-02-15 19:09:14 -0800
commit85d220cdadb06ad66edfa4a8addcb67e2d5d4e2c (patch)
treef51baf880e6d12fe914d857a03a96764ebb55288
parentpls commit (diff)
downloadin-class-exercise-11-yanablash-85d220cdadb06ad66edfa4a8addcb67e2d5d4e2c.tar.xz
in-class-exercise-11-yanablash-85d220cdadb06ad66edfa4a8addcb67e2d5d4e2c.zip
exercise completedHEADmain
-rw-r--r--InClassExercise11/InClassExercise11/main.cpp26
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