为了账号安全,请及时绑定邮箱和手机立即绑定

求教大神 哪里错了 c语言的

求教大神 哪里错了 c语言的

C
阿信111 2016-11-21 18:04:41
#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
提交
取消
意见反馈 帮助中心 APP下载
官方微信