mirror of
https://github.com/wczffl-503/OI-Codes.git
synced 2025-07-08 02:13:51 +08:00
归类了 OJ,整理了一下
This commit is contained in:
26
XSM OJ 重庆小码王集团OJ/三整数排序(2).cpp
Normal file
26
XSM OJ 重庆小码王集团OJ/三整数排序(2).cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
using namespace std;
|
||||
int main(){
|
||||
int a,b,c,n;
|
||||
cin >>a>>b>>c;
|
||||
if(a>b){
|
||||
n=a;
|
||||
a=b;
|
||||
b=n;
|
||||
}
|
||||
if(b>c){
|
||||
n=b;
|
||||
b=c;
|
||||
c=n;
|
||||
}
|
||||
if(a>b){
|
||||
n=a;
|
||||
a=b;
|
||||
b=n;
|
||||
}
|
||||
cout <<a<<" "<<b<<" "<<c;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user