编程
求三角形面积。输入三角形的三条边长,计算三角形的面积
用海伦公式 #include #include int main() { double a,b,c,p,s; printf("请输入三角形三边长:\n"); scanf("%lf%lf%lf", &a,&b,&c); p=(a+b+c)/2.0; s=sqrt(p*(p-a)*(p-b)*(p-c)); printf("三角形面积为%.2lf\n", s); return 0; }
input a,b,c let p=(a+b+c)/2 s=[p*(p-a)(p-b)(p-c)]^(1/2) print s
input a,b,c let p=(a+b+c)/2 s=[p*(p-a)(p-b)(p-c)]^(1/2) print s
答:#include<stdio.h> #include<math.h> void main() { float a,c,b,d,s; sc...详情>>
答:详情>>