From 8581c2700827ecdcc8cac744c0a5278abadf83f8 Mon Sep 17 00:00:00 2001 From: Artem Date: Mon, 25 Nov 2024 18:16:48 +0400 Subject: [PATCH] add laba3 --- main.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 52794b1..b8e4804 100644 --- a/main.c +++ b/main.c @@ -1,3 +1,23 @@ -void main() { +include +#include +int main() { + int t; + SetConsoleCP(1251); + SetConsoleOutputCP(1251); + printf("Введите температуру:");//Ульяовск сентябрь + scanf_s("%d", &t); + + if (t < 10) { + printf("Мороз"); + } + if ((10 <= t) && (t < 15)) { + printf("Холодно"); + } + if ((15 <= t) && (t < 26)) { + printf("Тепло"); + } + if (t >= 26) { + printf("Жарко"); + } } \ No newline at end of file