/*Before seeing the code solution make sure that you have tried enough. Don’t copy- paste the whole code. Find out the logic. If you face any trouble, just inform me in comment.*/
#include<stdio.h>
main()
{
int a,b,c,MAIRORAB,mairor;
scanf("%d%d%d",&a,&b,&c);
MAIRORAB=((a+b)+abs(a-b))/2;
mairor=((MAIRORAB+c)+abs(MAIRORAB-c))/2;
printf("%d eh o maior\n",mairor);
return 0;
}
#include<stdio.h>
main()
{
int a,b,c,MAIRORAB,mairor;
scanf("%d%d%d",&a,&b,&c);
MAIRORAB=((a+b)+abs(a-b))/2;
mairor=((MAIRORAB+c)+abs(MAIRORAB-c))/2;
printf("%d eh o maior\n",mairor);
return 0;
}
//Happy_Coding
No comments:
Post a Comment