Guest User

Untitled

a guest
Dec 15th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int a,b,res;
  6. while((scanf("%d %d",&a,&b)!=EOF))
  7. {
  8. if((a<0)&&(b<0))
  9. break;
  10.  
  11. if((a==0)&&(b>50))
  12. a=100;
  13. else if ((b==0)&&(a>50))
  14. b=100;
  15.  
  16. if(a>b)
  17. {
  18. res=a-b;
  19. printf("%d\n",res);
  20. }
  21. else if (a<b)
  22. {
  23. res=b-a;
  24. printf("%d\n",res);
  25. }
  26. }
  27. return 0;
  28. }
Add Comment
Please, Sign In to add comment