C语言 输入三个数,如果能构成三角形的三边,计算输出三角形面积,否则输 ...答:include "stdio.h"#include "math.h"int main(){ double a,b,c,sum,area; printf("请输入三个数:"); scanf("%lf%lf%lf",&a,&b,&c); if(a>0 && b>0 && c>0 && a+b>c && b+c>a && a+c>b) { printf("输入的三边能组成三角形,面积:"); sum=...
C语言,求三角形面积:从键盘输入三个顶点坐标(x1,y1)(x2,y2)(x3,y3...答:include #include float dis(float x1,float y1,float x2,float y2){float dx,dy;dx=x1-x2;dy=y1-y2;return sqrt(dx*dx+dy*dy);}int main(){float x1,x2,x3,y1,y2,y3,p,s,a,b,c;scanf("%f %f",&x1,&y1);scanf("%f %f",&x2,&y2);scanf("%f %f",&x3,&y3);a=...