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