#include <stdio.h>
#include <math.h>
typedef struct {
double a;
double b;
double c;
}Triangle;
double Area(Triangle t) {
double s = (t.a + t.b + t.c)/2;
double area
= sqrt(s
*(s
- t.
a)*(s
- t.
b)*(s
- t.
c)); return area;
}
int main(void) {
Triangle t;
double area = Area(t);
printf("三角形の辺 a: %.2lf\n", t.
a); printf("三角形の辺 b: %.2lf\n", t.
b); printf("三角形の辺 c: %.2lf\n", t.
c); printf("三角形の面積: %.2lf\n", area
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxtYXRoLmg+Cgp0eXBlZGVmIHN0cnVjdCB7Cglkb3VibGUgYTsKCWRvdWJsZSBiOwoJZG91YmxlIGM7Cn1UcmlhbmdsZTsKCmRvdWJsZSBBcmVhKFRyaWFuZ2xlIHQpIHsKCWRvdWJsZSBzID0gKHQuYSArIHQuYiArIHQuYykvMjsKCWRvdWJsZSBhcmVhID0gc3FydChzKihzIC0gdC5hKSoocyAtIHQuYikqKHMgLSB0LmMpKTsKCXJldHVybiBhcmVhOwp9CgppbnQgbWFpbih2b2lkKSB7CglUcmlhbmdsZSB0OwoJc2NhbmYoIiVsZiIsICZ0LmEpOwoJc2NhbmYoIiVsZiIsICZ0LmIpOwoJc2NhbmYoIiVsZiIsICZ0LmMpOwoKCWRvdWJsZSBhcmVhID0gQXJlYSh0KTsKCXByaW50Zigi5LiJ6KeS5b2i44Gu6L66IGE6ICUuMmxmXG4iLCB0LmEpOwoJcHJpbnRmKCLkuInop5LlvaLjga7ovrogYjogJS4ybGZcbiIsIHQuYik7CglwcmludGYoIuS4ieinkuW9ouOBrui+uiBjOiAlLjJsZlxuIiwgdC5jKTsKCXByaW50Zigi5LiJ6KeS5b2i44Gu6Z2i56mNOiAlLjJsZlxuIiwgYXJlYSk7CgkKCXJldHVybiAwOwp9