diff --git a/WindowsProject11/WindowsProject11/WindowsProject11.cpp b/WindowsProject11/WindowsProject11/WindowsProject11.cpp index af1225d..60f18ec 100644 --- a/WindowsProject11/WindowsProject11/WindowsProject11.cpp +++ b/WindowsProject11/WindowsProject11/WindowsProject11.cpp @@ -181,28 +181,23 @@ INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) #include #include - - void main() { - int temperature; + int v1, v2, v3; + int max; SetConsoleCP(1251); SetConsoleOutputCP(1251); - printf("Введите температуру в Симферополе осенью: "); - scanf_s("%d", &temperature); + printf("Введите 3 числа: "); + scanf_s("%d%d%d", &v1, &v2, &v3); - if ((temperature < 10 && temperature >= 0)) { - printf("Мороз\n"); + max = v1; + if (v2 > max) { + max = v2; } - else if (temperature < 20 && temperature >= 10) { - printf("Холодно\n"); - } - else if (temperature < 30 && temperature >= 20) { - printf("Тепло\n"); - } - else if (temperature >= 30) { - printf("Жарко\n"); + if (v3 > max) { + max = v3; } + printf("max = %d", max); }