include<stdio.h>
define PI 3.1416
int main()
{
double r,h;
double cl,cs,cv;
printf("请输入半径r和圆柱的高h\n");
scanf("%lf,%lf\n",&r,&h);
cl=2PIr;cs=PIrr;cv=cs*h;
printf("圆的周长cl=%.4lf\n 圆的面积cs=%.4lf\n 圆柱的体积cv=%.4lf\n",cl,cs,cv);
return 0 ;
}
2023-09-23 17:04:03
int main()
{
double r,h;
double cl,cs,cv;
printf("请输入半径r和圆柱的高h\n");
scanf("%lf,%lf\n",&r,&h);
cl=2PIr;cs=PIrr;cv=cs*h;
printf("圆的周长cl=%.4lf\n 圆的面积cs=%.4lf\n 圆柱的体积cv=%.4lf\n",cl,cs,cv);
return 0 ;
}
下一篇:Redis6常用语句