#include <stdio.h>
#define PI 3.14159265358979323846 // πの定義
// 円錐の体積を計算する関数
double delta_cone(double r, double h) {
return (1.0 / 3.0) * PI * r * r * h; // 体積の計算
}
int main() {
double radius, height;
// 半径と高さの入力
printf("円錐の高さ h を入力してください: ");
// 体積の計算
double volume = delta_cone(radius, height);
// 結果の表示
printf("円錐の体積: %.2f\n", volume
); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNkZWZpbmUgUEkgMy4xNDE1OTI2NTM1ODk3OTMyMzg0NiAvLyDPgOOBruWumue+qQoKLy8g5YaG6YyQ44Gu5L2T56mN44KS6KiI566X44GZ44KL6Zai5pWwCmRvdWJsZSBkZWx0YV9jb25lKGRvdWJsZSByLCBkb3VibGUgaCkgewogICAgcmV0dXJuICgxLjAgLyAzLjApICogUEkgKiByICogciAqIGg7IC8vIOS9k+epjeOBruioiOeulwp9CgppbnQgbWFpbigpIHsKICAgIGRvdWJsZSByYWRpdXMsIGhlaWdodDsKCiAgICAvLyDljYrlvoTjgajpq5jjgZXjga7lhaXlipsKICAgIHByaW50Zigi5YaG44Gu5Y2K5b6EIHIg44KS5YWl5Yqb44GX44Gm44GP44Gg44GV44GEOiAiKTsKICAgIHNjYW5mKCIlbGYiLCAmcmFkaXVzKTsKICAgIHByaW50Zigi5YaG6YyQ44Gu6auY44GVIGgg44KS5YWl5Yqb44GX44Gm44GP44Gg44GV44GEOiAiKTsKICAgIHNjYW5mKCIlbGYiLCAmaGVpZ2h0KTsKCiAgICAvLyDkvZPnqY3jga7oqIjnrpcKICAgIGRvdWJsZSB2b2x1bWUgPSBkZWx0YV9jb25lKHJhZGl1cywgaGVpZ2h0KTsKCiAgICAvLyDntZDmnpzjga7ooajnpLoKICAgIHByaW50Zigi5YaG6YyQ44Gu5L2T56mNOiAlLjJmXG4iLCB2b2x1bWUpOwoJcmV0dXJuIDA7Cn0K