#include <stdio.h>

#include <stdlib.h>

#include <math.h>

int main()

{

    double a,b,c,x, s;

    printf("输入三角形的三条边长:");

    scanf("%lf %lf %lf",&a,&b,&c);

    x=(a+b+c)/2.0;

    s=sqrt(x*(x-a)*(x-b)*(x-c));

    printf("三角形的面积为:%lf",s);

    return 0;

}

输入三角形的三条边长,计算出其面积并输出。

相关文章:

  • 2022-12-23
  • 2021-12-26
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2022-02-26
猜你喜欢
  • 2021-05-02
  • 2021-12-06
  • 2021-12-19
  • 2021-12-19
  • 2021-12-19
相关资源
相似解决方案