From 08fc80db5a1aa3826e52217c7bf3ae2fed16fb7a Mon Sep 17 00:00:00 2001 From: alexa Date: Thu, 24 Oct 2024 08:41:24 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=B5=D1=89=D0=B5=20=D0=BE=D0=B4=D0=BD=D1=83=20=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD=D1=83=D1=8E=20=D0=B2=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=B4=20=D0=BB=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=BD=D0=BE=D0=B9=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- laba12/laba12/laba12.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/laba12/laba12/laba12.cpp b/laba12/laba12/laba12.cpp index 822f3e6..4b07859 100644 --- a/laba12/laba12/laba12.cpp +++ b/laba12/laba12/laba12.cpp @@ -2,14 +2,14 @@ #include void main() { - int v1, v2, v3, v4, v5, v6; + int v1, v2, v3, v4, v5, v6, v7; int max; SetConsoleCP(1251); SetConsoleOutputCP(1251); - printf("Введите 5 чисел: "); - scanf_s("%d%d%d%d%d", &v1, &v2, &v3, &v4, &v5, &v6); + printf("Введите 7 чисел: "); + scanf_s("%d%d%d%d%d", &v1, &v2, &v3, &v4, &v5, &v6, &v7); max = v1; if (v2 > max) { @@ -27,6 +27,9 @@ void main() { if (v6 > max) { max = v6; } + if (v7 > max) { + max = v7; + } printf("max = %d", max); } \ No newline at end of file