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