编写程序,输入半径和高,求一个圆柱体的体积。

c语言编程题
2024-12-04 09:04:44
推荐回答(1个)
回答(1):

#include "stdio.h"尘败
#include "conio.h"
#define pi 3.14

main()
{
float r,h,result;
printf("please enter r:\n");
scanf("%f",&r);
printf("\nplease enter h:\n");
scanf("悉饥%f",&h);
printf("\n"派陆颤);
result=pi*r*r*h;
printf("the result is %f",result);
getch();
}