Advertisement
Guest User

Untitled

a guest
Feb 27th, 2020
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.    
  5.     int a,b,c;
  6.     scanf("%d %d %d", &a, &b, &c);
  7.  
  8.     if(a>b && a>c){
  9.         if(c>b){
  10.             int temp=c;
  11.             c=b;
  12.             b=temp;
  13.         }
  14.     }
  15.     else if(b>a && b>c){
  16.         int temp=a;
  17.         a=b;
  18.         b=temp;
  19.         if(c>b){
  20.             int temp=c;
  21.             c=b;
  22.             b=temp;
  23.         }
  24.     }
  25.     else if(c>a && c>b){
  26.         int temp=c;
  27.         c=a;
  28.         a=temp;
  29.         if(c>b){
  30.             int temp=c;
  31.             c=b;
  32.             b=temp;
  33.         }
  34.     }
  35.    
  36.     printf("%d %d %d", a, b, c);
  37.    
  38.  
  39.     return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement