diff --git a/WindowsProject1/WindowsProject1/WindowsProject1.cpp b/WindowsProject1/WindowsProject1/WindowsProject1.cpp index cc5a0f2..b75d270 100644 --- a/WindowsProject1/WindowsProject1/WindowsProject1.cpp +++ b/WindowsProject1/WindowsProject1/WindowsProject1.cpp @@ -178,3 +178,32 @@ INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) } return (INT_PTR)FALSE; } + +#include +#include + + + +void main() { + int temperature; + + SetConsoleCP(1251); + SetConsoleOutputCP(1251); + + printf("Введите температуру в Симферополе осенью: "); + scanf_s("%d", &temperature); + + if ((temperature < 10 && temperature >= 0)) { + printf("Мороз\n"); + } + else if (temperature < 20 && temperature >= 10) { + printf("Холодно\n"); + } + else if (temperature < 30 && temperature >= 20) { + printf("Тепло\n"); + } + else if (temperature >= 30) { + printf("Жарко\n"); + } + +} \ No newline at end of file