include <stdio.h>#define PI (3.1415927)int main(){ double r,h; scanf("%lf%lf",&r,&h); printf("%lf\n",1.0/3*PI*r*r*h); return 0;}
include<stdio.h> main(){float r,h,volume=0,PI=3.14;printf("输入圆锥体的半径:");scanf("%f\n",r);printf("输入圆锥体的高度:");scanf("%f\n",h);volume=1/3*PI*r*r*h;printf("圆锥体的体积是:%f",volume);}
IT技术 c语言 从键盘输入圆锥体的半径r和高度h,并计算其体积。最新回答 (1条回答) 匿名用户 1级 2018-12-23 回答#include <stdio.h> #define PI (3.1415927) int main() { double r,h; scanf("%lf%lf",&r,&h); printf("%lf\n",1.0/...