# include
# include
main() {float a,b,c,p,s ;loop: printf("请输入三角形的三条边长:a,b,c "); scanf("%f,%f,%f",&a,&b,&c); if ((a+b<=c)||(a+c<=b)||(c+b<=a)) { printf("输入有误,不能组成三角形.n"); goto loop; } else { p=(a+b+c)/2; s=sqrt(p*(p-a)*(p-b)*(p-c)); printf("三角形的面积为:%fn",s);} }x1a流程图: