From c981c403d98c88bf976544399552360745314c36 Mon Sep 17 00:00:00 2001 From: Alexander Zhirov Date: Thu, 9 Sep 2021 18:27:20 +0300 Subject: [PATCH] lesson_51 --- lesson_51/main.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 lesson_51/main.cpp diff --git a/lesson_51/main.cpp b/lesson_51/main.cpp new file mode 100644 index 0000000..95cd327 --- /dev/null +++ b/lesson_51/main.cpp @@ -0,0 +1,35 @@ +/* + * main.cpp + * + * Created on: 9 сент. 2021 г. + * Author: alexander + */ +#include + +using namespace std; + +int main() +{ + cout << "Введите число: "; + int x; + cin >> x; + + cout << "Введите большее число: "; + int y; + cin >> y; + + if (x > y) + { + int z = y; + y = x; + x = z; + } + + cout << "Меньшее число: " << x << endl; + cout << "Большее число: " << y << endl; + + return 0; +} + + +