From c91de5e5d1ab2ad38162e939dfd7919584084f93 Mon Sep 17 00:00:00 2001 From: Mr-Sulfate Date: Wed, 13 Nov 2024 12:17:22 +0400 Subject: [PATCH] lb4 --- work2/work2/work2.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 work2/work2/work2.cpp diff --git a/work2/work2/work2.cpp b/work2/work2/work2.cpp new file mode 100644 index 0000000..bc5e1a6 --- /dev/null +++ b/work2/work2/work2.cpp @@ -0,0 +1,33 @@ + +#include +#include +#include + +void main() +{ + SetConsoleCP(1251); + SetConsoleOutputCP(1251); + int t; + + printf("Введите температуру в комнате: "); + scanf_s("%d", t); + + + if (t<18) { + printf("> Холодно"); + } + + if (t >= 18 and t<22) { + printf("> Прохладно"); + } + + if (t>=22 and t<26) { + printf("> Тепло"); + } + + if (t >= 26) { + printf("> Жарко"); + } + + +} \ No newline at end of file