Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int a,b,c,k=0;
- while(1)
- {
- scanf("%d %d %d",&a,&b,&c);
- if ( a == 0 && b == 0 && c == 0) break;
- k=0;
- if ( a >= b )
- {
- a^=b;
- b^=a;
- a^=b;
- k++;
- }
- if ( a >= c )
- {
- a^=c;
- c^=a;
- a^=c;
- k++;
- }
- if ( b >= c )
- {
- b^=c;
- c^=b;
- b^=c;
- k++;
- }
- if (k == 1 || k == 2 || k == 3 || k== 0 ) printf("%d\n",b);
- else printf("%d\n",c);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement