From dd16a3269f72f3027a43e6091e73029328b9fa41 Mon Sep 17 00:00:00 2001 From: alexa Date: Wed, 20 Nov 2024 23:36:29 +0400 Subject: [PATCH] =?UTF-8?q?3=20=D0=B8=204.=20=D1=81=D0=BE=D0=B7=D0=B4?= =?UTF-8?q?=D0=B0=D0=BB=20=D0=B2=D1=82=D0=BE=D1=80=D1=83=D1=8E=20=D0=B2?= =?UTF-8?q?=D0=B5=D1=82=D0=BA=D1=83,=20=D0=BF=D1=80=D0=BE=D0=BF=D0=B8?= =?UTF-8?q?=D1=81=D0=B0=D0=BB=20=D0=BB=D0=BE=D0=B3=D0=B8=D0=BA=D1=83=20?= =?UTF-8?q?=D1=81=D0=BB=D0=B5=D0=B4=D1=83=D1=8E=D1=89=D0=B5=D0=B9=20=D0=BB?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=BD=D0=BE?= =?UTF-8?q?=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 --- .../WindowsProject11/WindowsProject11.cpp | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) 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"); + } + +}