aboutsummaryrefslogtreecommitdiff
path: root/In_class_excercise11
diff options
context:
space:
mode:
authorraquelc <[email protected]>2024-02-15 19:36:44 -0800
committerraquelc <[email protected]>2024-02-15 19:36:44 -0800
commitf58de19c43e5469aa7a857d1ea7831723d00993b (patch)
tree7dc9f51ed7a67feb7096aeda78c7049d565bf232 /In_class_excercise11
parentfirst commit (diff)
downloadin-class-exercise-11-raquel191-main.tar.xz
in-class-exercise-11-raquel191-main.zip
assignment completeHEADmain
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