#include <stdio.h>
#include <math.h>
int main() {
    double a,b,c;
    scanf("%lf %lf %lf",&a,&b,&c);
    double cosA = (pow(b,2)+pow(c,2)-pow(a,2))/(2*b*c);
    double sinA = sqrt(1-pow(cosA,2));
    printf("circumference=%.2lf area=%.2lf",a+b+c,0.5*b*c*sinA);
}

在记不住海伦公式的前提下,用余弦定理计算出sinA,然后用面积公式0.5*b*c*sinA

内存要求不高的时候,用double保证精度。