C-study/02/3/3.c

14 lines
215 B
C
Raw Normal View History

#include<stdio.h>
#include<math.h>
int main()
{
float a,b,c,area,s;
scanf("%f %f %f",&a,&b,&c);
s = (a + b + c) / 2;
area = sqrt(s * (s - a) * (s - b) * (s-c));
printf("area = %.2f",area);
return 0;
}