题解 | #三角形判断#

三角形判断

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

#include <stdio.h>
int main()
{
    int a = 0;
    int b = 0;
    int c = 0;
    while (scanf("%d %d %d",&a,&b,&c)!=EOF)
    {
       if(a + b > c && a+ c> b && b +c >a)
       {
        if(a==b && 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;
}

全部评论

相关推荐

05-09 12:23
已编辑
华南理工大学 Java
野猪不是猪🐗:给他装的,双九+有实习的能看的上这种厂我直接吃⑨✌们拿它练练面试愣是给他整出幻觉了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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