URI Online Judge Solution | 1013 The Greatest

Solution:
I have took help from net.And after taking a look I understood what to do actually.

Here for each test case I have to use this formula

After using MaiorAB that means in portugese and in english by google translating i have find it is maximum or larger or more in AB
So in Maior is in MaiorAB and in from the input C

#include<iostream>
#include<cstdio>
#include<cstdlib>
int main()
{
int a,b,c,MaiorAB,maior;
scanf("%d %d %d",&a,&b,&c);
MaiorAB=(a+b+abs(a-b))/2;
maior=(MaiorAB+c+abs(MaiorAB-c))/2;
printf("%d eh o maior\n",maior);
return 0;
}

 

It would be a great help, if you support by sharing :)
Author: zakilive

Leave a Reply

Your email address will not be published.