Pages

Sunday 9 September 2012

UVA - 10055 - Hashmat the Brave Warrior

#include <stdio.h>

int main()
{
    long x=1,y=1,temp=1;
    while(scanf("%ld %ld",&x,&y)==2){
        if(y>x)
            temp=y-x;
        else
            temp=x-y;
        printf("%ld\n",temp);
          }
    return 0;
}

No comments:

Post a Comment