天天看点

c语言错误E0167,E0167"int" 类型的实参与 "const char *" 类型的形参不兼容 什么问题怎么解决...

按你的程序作了必要的几处修改:

#include 

#include 

#define Pi 3.1415927

int main()

{

double Input,ra,f;

printf("Please input your number to calcution what you want\n\n1.Ball's Volume\n2.Surface Area of The Ball\n\n");

scanf("%lf", &Input);

if (Input == 1)

{

printf(" \n\n\nV=(4/3)Pi*r^3\nPlease input 'r'\n");

scanf("%lf",&ra);

f = (4 * Pi * ra * ra * ra / 3);

printf("%lf",f);

getch();

}

return 0;

}

程序能够运行了:

c语言错误E0167,E0167"int" 类型的实参与 "const char *" 类型的形参不兼容 什么问题怎么解决...

但是你的 2.Surface Area of The Ball 程序还未加入。