ravesli/lesson_51/main.cpp

36 lines
503 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* main.cpp
*
* Created on: 9 сент. 2021 г.
* Author: alexander
*/
#include <iostream>
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;
}