Uva Problem 10055 - Hashmat the Brave Warrior Solution

Problem Link
Uva  10055 - Hashmat the Brave Warrior Solution

Solution:
#include<stdio.h>
int main()
{
    long long a,b,s,temp;
    while(scanf("%lld%lld",&a,&b)!=EOF)
    {
        if(a>b)
        {
            temp=a;
            a=b;
            b=temp;
        }
        s=b-a;
        printf("%lld\n",s);
    }
    return 0;
}


No comments

Theme images by enjoynz. Powered by Blogger.