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