From f58de19c43e5469aa7a857d1ea7831723d00993b Mon Sep 17 00:00:00 2001 From: raquelc Date: Thu, 15 Feb 2024 19:36:44 -0800 Subject: assignment complete --- In_class_excercise11/In_class_excercise11/Main.cpp | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'In_class_excercise11') 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 +#include 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 -- cgit v1.2.3