From 17f57192f58307be5506ef8cce656d943238aecb Mon Sep 17 00:00:00 2001 From: Zodiak 303 Date: Thu, 31 Oct 2024 02:25:28 +0400 Subject: [PATCH] 456 --- Лаба10.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Лаба10.c b/Лаба10.c index 20ff2ba..1092c73 100644 --- a/Лаба10.c +++ b/Лаба10.c @@ -71,4 +71,27 @@ void main() { } while (n != 0); } -123456 \ No newline at end of file +void main() +{ + int odin, dwa, max, min; + + SetConsoleCP(1251); + SetConsoleOutputCP(1251); + + printf("Ïåðâîå ÷èñëî - "); + scanf_s("%d", &odin); + printf("Âòîðîå ÷èñëî - "); + scanf_s("%d", &dwa); + + if (odin > dwa) { + min = dwa; + max = odin; + } + else { + min = odin; + max = dwa; + } + + printf("Áîëüøåå ÷èñëî - %d\n", max); + printf("Ìåíüøåå ÷èñëî - %d", min); +} \ No newline at end of file