//This C++ program is the solution to
//the problem put up on the UVa online judge
//website. The problem id is 10055
//
//Question: Hashmat the brave warrior
#include<iostream>
using namespace std;
int main()
{
long a,b;
while(cin>>a>>b)
{
if(a>b)
{
cout<<a-b<<"\n";
}
else
{
cout<<b-a<<"\n";
}
}
}
//Author of solution : Mayank Rajoria
//the problem put up on the UVa online judge
//website. The problem id is 10055
//
//Question: Hashmat the brave warrior
#include<iostream>
using namespace std;
int main()
{
long a,b;
while(cin>>a>>b)
{
if(a>b)
{
cout<<a-b<<"\n";
}
else
{
cout<<b-a<<"\n";
}
}
}
//Author of solution : Mayank Rajoria
#include
ReplyDeleteusing namespace std;
int main()
{
long int x,y;
cin>>x>>y;
if(x>y){
cout<<x-y;
}
else{
cout<<y-x;
}
return 0;
}
Right or wrong ?