Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int a, b, c;
- cin >> a >> b >> c;
- if (a>=b and a>=c){
- if (b>c){
- cout << c << " " << b << " " << a;
- }
- else {
- cout << b << " " << c << " " << a;
- }
- }
- else if (b>=a and b>=c){
- if (a>c){
- cout << c << " " << a << " " << b;
- }
- else {
- cout << a << " " << c << " " << b;
- }
- }
- else {
- if (a>b){
- cout << b << " " << a << " " << c;
- }
- else {
- cout << a << " " << b << " " << c;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement