#include<stdio.h>double main(){double x,y;scanf("%f",&x);printf("输入x的值为"); if(x<1){y=x*x;} else{x>=10?y=3x-11: y=2x-1; }printf("y=%f",y);return 0;}错误提示G:\c语言试水基地\111.cpp(15) : error C2059: syntax error : 'bad suffix on number'G:\c语言试水基地\111.cpp(15) : error C2146: syntax error : missing ',' before identifier 'x'G:\c语言试水基地\111.cpp(16) : error C2059: syntax error : 'bad suffix on number'G:\c语言试水基地\111.cpp(16) : error C2146: syntax error : missing ';' before identifier 'x'G:\c语言试水基地\111.cpp(16) : warning C4552: '-' : operator has no effect; expected operator with side-effect执行 cl.exe 时出错.
目前暂无任何回答
- 0 回答
- 0 关注
- 1464 浏览
添加回答
举报
0/150
提交
取消