diff --git a/WindowsProject11/WindowsProject11/WindowsProject11.cpp b/WindowsProject11/WindowsProject11/WindowsProject11.cpp index 28b9990..af1225d 100644 --- a/WindowsProject11/WindowsProject11/WindowsProject11.cpp +++ b/WindowsProject11/WindowsProject11/WindowsProject11.cpp @@ -178,3 +178,31 @@ 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"); + } + +}