#include<stdio.h>
#include<math.h>
#define pi 3.14
int main()
{
double r, h, c, s1, s2, v1, v2;
printf("please scanf the r and the h of round\n");
printf("r=");
scanf_s("%lf", &r);
printf("h=");
scanf_s("%1f", &h);
c = 2 * pi * r;
s1= pi * pow(r, 2);
s2 = 4 * pi * pow(r, 2);
v1 = 4 / 3 * pi * pow(r, 3);
v2 = pi * pow(r, 2) * h;
printf("周长为%.2f,面积为%.2f,表面积为%.2f,圆球体积为%.2f,圆柱的体积为%lf", c, s1, s2, v1,v2);
return 0;
}
其他输出结果都正常,就是最后圆柱体积输出错误