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