diff options
| author | raquelc <[email protected]> | 2024-02-15 19:36:44 -0800 |
|---|---|---|
| committer | raquelc <[email protected]> | 2024-02-15 19:36:44 -0800 |
| commit | f58de19c43e5469aa7a857d1ea7831723d00993b (patch) | |
| tree | 7dc9f51ed7a67feb7096aeda78c7049d565bf232 | |
| parent | first commit (diff) | |
| download | in-class-exercise-11-raquel191-main.tar.xz in-class-exercise-11-raquel191-main.zip | |
| -rw-r--r-- | In_class_excercise11/In_class_excercise11/Main.cpp | 24 |
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 |