#include <stdio.h>
#define PI 3.14159
// 円錐の体積を計算する関数
double cone_volume(double radius, double height) {
return (1.0 / 3.0) * PI * radius * radius * height;
}
int main() {
double r, h;
// 半径と高さの入力を促す
// 体積を計算し、表示
double volume = cone_volume(r, h);
printf("円錐の体積は %.2f です\n", volume
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNkZWZpbmUgUEkgMy4xNDE1OQoKLy8g5YaG6YyQ44Gu5L2T56mN44KS6KiI566X44GZ44KL6Zai5pWwCmRvdWJsZSBjb25lX3ZvbHVtZShkb3VibGUgcmFkaXVzLCBkb3VibGUgaGVpZ2h0KSB7CiAgICByZXR1cm4gKDEuMCAvIDMuMCkgKiBQSSAqIHJhZGl1cyAqIHJhZGl1cyAqIGhlaWdodDsKfQoKaW50IG1haW4oKSB7CiAgICBkb3VibGUgciwgaDsKICAgIAogICAgLy8g5Y2K5b6E44Go6auY44GV44Gu5YWl5Yqb44KS5L+D44GZCiAgICBwcmludGYoInIiKTsKICAgIHNjYW5mKCIlbGYiLCAmcik7CiAgICBwcmludGYoImgiKTsKICAgIHNjYW5mKCIlbGYiLCAmaCk7CgogICAgLy8g5L2T56mN44KS6KiI566X44GX44CB6KGo56S6CiAgICBkb3VibGUgdm9sdW1lID0gY29uZV92b2x1bWUociwgaCk7CiAgICBwcmludGYoIuWGhumMkOOBruS9k+epjeOBryAlLjJmIOOBp+OBmVxuIiwgdm9sdW1lKTsKICAgIAogICAgcmV0dXJuIDA7Cn0K