Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main(){
- int a,b,c,x,y,z;
- scanf("%d%d%d",&a,&b,&c);
- if(a>b){
- if(c>b){
- x=a;
- y=c;
- z=b;
- }else{
- x=a;
- y=b;
- z=c;
- }
- }else if(b>c){
- if(c>a){
- x=b;
- y=c;
- z=a;
- }else{
- x=b;
- y=a;
- z=c;
- }
- }else{
- if(a>b){
- x=c;
- y=a;
- z=b;
- }else{
- x=c;
- y=b;
- z=a;
- }
- }
- printf("%d\n%d\n%d\n",z,y,x,a,b,c);
- printf("\n%d\n%d\n%d\n",a,b,c);
- return 0;
- }
Add Comment
Please, Sign In to add comment