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