diff --git a/laba12/laba12/laba12.cpp b/laba12/laba12/laba12.cpp index 335545e..822f3e6 100644 --- a/laba12/laba12/laba12.cpp +++ b/laba12/laba12/laba12.cpp @@ -2,14 +2,14 @@ #include void main() { - int v1, v2, v3, v4, v5; + int v1, v2, v3, v4, v5, v6; int max; SetConsoleCP(1251); SetConsoleOutputCP(1251); printf("Введите 5 чисел: "); - scanf_s("%d%d%d%d%d", &v1, &v2, &v3, &v4, &v5); + scanf_s("%d%d%d%d%d", &v1, &v2, &v3, &v4, &v5, &v6); max = v1; if (v2 > max) { @@ -24,6 +24,9 @@ void main() { if (v5 > max) { max = v5; } + if (v6 > max) { + max = v6; + } printf("max = %d", max); } \ No newline at end of file