Advertisement
Guest User

SwitchingAscending

a guest
Feb 25th, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.23 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int a,b,temp;
  5. while(1){
  6.     scanf("%d %d",&a,&b);
  7.     if(a==0 && b==0){break;}
  8.     if(b>a){
  9.         temp=a;
  10.         a=b;
  11.         b=temp;
  12.     }
  13.     printf("%d %d\n",a,b);
  14.  
  15. }
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement