dsdeep

URI 1013

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