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