31.零起点学算法25——判断是否直角三角形

#include<stdio.h>
int main ()
{
    int a,b,c;
    while(scanf("%d%d%d",&a,&b,&c)!=EOF)
    {
        if ((a*a+b*b==c*c)||(a*a+c*c==b*b)||(b*b+c*c==a*a))
        printf("yes");
        else
        printf("no");
    }
    return 0;
}

猜你喜欢

转载自www.cnblogs.com/Estwind/p/9728079.html