noshin98

uva12468

Jun 26th, 2016
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int a,b,i,c;
  5.     while(scanf("%d%d",&a,&b)==2)
  6.     {
  7.  
  8.         if(a<0 &&b<0)
  9.             break;
  10.  
  11.             c=abs(a-b);
  12.  
  13.  
  14.         if(c>=50)
  15.  
  16.             c=100-c;
  17.  
  18.         printf("%d\n",c);
  19.  
  20.     }
  21.     return 0;
  22. }
Add Comment
Please, Sign In to add comment