Tuesday, February 25, 2014

UVa 10055 - Hashmat the Brave Warrior solution

Problem link :  UVa 10055 - Hashmat the Brave Warrior

Solution : 


#include<stdio.h>
int main()
{
    long long a,b,c;
    while(scanf("%lld %lld",&a,&b)==2)
    {
        if(a>=b)
            c=a-b;
        else
            c=b-a;

        printf("%lld\n",c);
    }
    return 0;
}



No comments:

Post a Comment