满意答案
wl3080342
2013.04.23
采纳率:48% 等级:12
已帮助:5482人
这个是我新编的,你可以试试
#include
#include
void main()
{
float a,b,c,d,s;
scanf("%f,%f,%f",&a,&b,&c);
if(a+b>c&&a+c>b&&b+c>a)
{
if(a==b||b==c||c==a)
{if(a==b&&b==c) printf("this is a dengbiansanjiaoxing\n"); else printf("this is a dengyao sanjiaoxing\n"); }
else if(a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a)
printf("this is zhijiao\n");
else printf("yibansanjiaoxing\n");
d=(a+b+c)/2;
s=sqrt(d*(d-a)*(d-b)*(d-c));
printf("%f\n",s);
}
}
else printf("bushi sanjiaoxing ") ;
}
12分享举报