怎么做

芦睿霖  •  1年前


 


评论:

#include<iostream>  // cin\cout\endl
#include<cstdio>    //scanf()\printf()
#include<cstring>   // strcpy()\strcat()\strcmp()\strlen()\memset()

#include<cmath>  //sqrt()\pow()\abs()\ceil()\floor()\max()\min() 
using namespace std;
int main(){
   int a,b,c;
   cin>>a>>b>>c;
   if (a>b && a>c && b>c){
       cout<<a<<b<<c<<endl;
   }
   if (a>b && a>c && c>b){
        cout<<a<<c<<b<<endl;
   }
   if (b>a && b>c && a>c){
       cout<<b<<a<<c<<endl;
   }
   if (b>a && b>c && c>a){
       cout<<b<<c<<a<<endl;
   }
   if (c>b && c>a && a>b){
       cout<<c<<a<<b<<endl;
   }
   if (c>b && c>a && a<b){
       cout<<c<<b<<a<<endl;
   }
   return 0;
}


陈开远  •  12天前

× 提交成功

比较三个数大小II

输入3个整数a、b、c,按从小到大的顺序输出。

Input

输入包含一行,包含三个用空格隔开的整数。

Output

请按从小到大的顺序输出读入的三个数。请注意行尾输出换行。

Examples

Input

30 15 20

Output

15 20 30

来源

教学题-C语言

Time limit1 second
Memory limit32 MB

提交记录

刚刚 Accepted  
11分钟前 Wrong Answer  
12分钟前 Compile Error  
16天前 Wrong Answer  

© C++题库系统 OJ 2026


陈开远  •  12天前