思路:知道三边求三角形面积,要用海伦公式。
//(海伦公式)(p=(a+b+c)/2)
//S=sqrt[p(p-a)(p-b)(p-c)]
#include <stdio.h>
#include <math.h>
//(海伦公式)(p=(a+b+c)/2)
//S=sqrt[p(p-a)(p-b)(p-c)]
int main()
{
int a = 0, b = 0, c = 0;
scanf("%d %d %d", &a, &b, &c);
float circumference = a + b + c;
float p = (a + b + c) / 2.0;
float area = sqrt(p*(p - a)*(p - b)*(p - c));
printf("circumference=%.2f area=%.2f", circumference, area);
return 0;
}