From 4ae0452bc4c7714c62e08cc856b0cf18d3a88274 Mon Sep 17 00:00:00 2001 From: alexa Date: Wed, 20 Nov 2024 22:51:32 +0400 Subject: [PATCH] =?UTF-8?q?3=20=D0=B8=204.=20=D0=BF=D1=80=D0=BE=D0=BF?= =?UTF-8?q?=D0=B8=D1=81=D0=B0=D0=BB=20=D0=BB=D0=BE=D0=B3=D0=B8=D0=BA=D1=83?= =?UTF-8?q?=20=D1=81=D0=BB=D0=B5=D0=B4=D1=83=D1=8E=D1=89=D0=B5=D0=B9=20?= =?UTF-8?q?=D0=BB=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=BD?= =?UTF-8?q?=D0=BE=D0=B9=20=D0=BF=D0=BE=20=D0=9E=D0=90=20=D0=B8=20=D0=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WindowsProject1/WindowsProject1.cpp | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) 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