From 731ba32ed6d07c67a588ab94e7c04a5e243c8969 Mon Sep 17 00:00:00 2001 From: Misha Date: Tue, 16 Sep 2025 19:44:34 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20elem1.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- elem1.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/elem1.cpp b/elem1.cpp index b9acc4d..8a17cb4 100644 --- a/elem1.cpp +++ b/elem1.cpp @@ -19,13 +19,12 @@ int main() { } cout << "Показати масив (рядки):\n"; - for (i = 0; i < N; ++i) { + for (i = 0; i < N; ++i) for (j = 0; j < M; ++j) { cout.width(4); cout << arr[i][j]; } cout << endl; - } int totalSum = 0; int minElement = arr[0][0]; @@ -38,7 +37,7 @@ int main() { } } - for (i = 0; i < N; ++i) { + for (i = 0; i < N; ++i) for (j = 0; j < M; ++j) { if (arr[i][j] < minElement) { minElement = arr[i][j]; @@ -47,7 +46,6 @@ int main() { maxElement = arr[i][j]; } } - } double average = 0.0; if (elementCount > 0) {