UVa online judge problem:11854
(EGYPT)
Problem link:
https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2954
Solution:
#include<stdio.h>
int main()
{
long long int a,b,c,i;
for(i=1;;i++)
{
scanf("%lld%lld%lld",&a,&b,&c);
if(a==0&&b==0&&c==0) break;
else if(((a*a)==(b*b)+(c*c))||((b*b)==(a*a)+(c*c))||((c*c)==(a*a)+(b*b)))
printf("right\n");
else printf("wrong\n");
}
return 0;
}
//Language:C
No comments:
Post a Comment