Accepted solution

UVA 10055 - Hashmat the Brave Warrior solution in C++

Open original problem
Source code

#include <iostream>

using namespace std;

int main()

{

    long long int i,j;

    while(cin>>i && cin>>j)

    {

        if(i>j)

        {

            cout<<i-j<<endl;

        }

        else

        {

            cout<<j-i<<endl;

        }

    }

    return 0;

}
Join the discussion

Add your comment