aboutsummaryrefslogtreecommitdiff
path: root/In_class_excercise11
diff options
context:
space:
mode:
Diffstat (limited to 'In_class_excercise11')
-rw-r--r--In_class_excercise11/In_class_excercise11/Main.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/In_class_excercise11/In_class_excercise11/Main.cpp b/In_class_excercise11/In_class_excercise11/Main.cpp
index fd23488..c70510c 100644
--- a/In_class_excercise11/In_class_excercise11/Main.cpp
+++ b/In_class_excercise11/In_class_excercise11/Main.cpp
@@ -4,9 +4,33 @@
//In class extercise 11
#include <iostream>
+#include <ostream>
using namespace::std;
+const size_t Row = 3;
+const size_t Colum = 3;
+int matrix[Row][Colum];
+
+void Print2DArray(int(&matrix)[Row][Colum]) {
+ for (auto i = 0u; i < Row; ++i) {
+
+ for (auto j = 0u; j < Colum; ++j) {
+ int matrix[Row][Colum]{
+ {1, 2, 3},
+ {4, 5, 6},
+ {7, 8, 9},
+ };
+ cout << matrix[i][j] << " ";
+ }
+ cout << endl;
+ }
+ cout << endl;
+}
+
int main() {
+ Print2DArray(matrix);
+
+
return 0;
} \ No newline at end of file