作业帮 > 综合 > 作业

error invalid operands to binary have double and int

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/08 13:13:46
error invalid operands to binary have double and int
#include
#include
#define BallVol(r) (4/3)*(3.14159926)*(r)^3
int main()
{
float a,b;
printf("Please input the r:");
scanf("%f",&a);
for(a=1;a
三次方不是这样搞滴 ^3,^表示bit运算,必须是整数
不用库函数情况下,三次方只能老老实实的乘三次