题解 | #三角形判断#

三角形判断

https://www.nowcoder.com/practice/689ec1e742394e09b1059556fc167b65

#include <stdio.h>

int main() {
    int a,b,c;
    while(scanf("%d%d%d",&a,&b,&c)!=EOF)
    {
        if(b+c>a && a+c>b && a+b>c)
        {
            if(a==b && a==c && b==c)
            {
                printf("Equilateral triangle!\n");
            }
            else if(a==b || a==c || b==c)
            {
                printf("Isosceles triangle!\n");
            }
            else{
                printf("Ordinary triangle!\n");
            }
        }
        else {
        printf("Not a triangle!\n");
        }
    }
    return 0;
}

全部评论

相关推荐

Twilight_m...:还是不够贴近现实,中关村那块60平房子200万怎么可能拿的下来,交个首付还差不多
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务