为什么才50分,求大佬看看
查看原帖
为什么才50分,求大佬看看
1404467
Lilindong楼主2024/7/27 21:35
#include<stdio.h>
#include<math.h>
int main()
{
    int a,b,c,max=0,i,f,s,t;
    scanf("%d%d%d",&a,&b,&c);
    if(a>=b&&a>=c)
    {
        f=a;
        s=b;
        t=c;
    }
    if(b>=a&&b>=c)
    {
        f=b;
        s=a;
        t=c;
    }
    if(c>=a&&c>=b)
    {
        f=c;
        s=b;
        t=a;
    }
    if((s+t)<f)
    printf("Not triangle");
    else if(f==s&&s==t)
    printf("Equilateral triangle");
    else if(f==s||f==t||s==t)
    printf("Isosceles triangle");
    else if(pow(s,2)+pow(t,2)==pow(f,2))
    printf("Right triangle");
    else if(pow(s,2)+pow(t,2)<pow(f,2))
    printf("Obtuse triangle");
    else
    printf("Acute triangle");
    return 0;
}
2024/7/27 21:35
加载中...