开发者

Error is showing on else if and && statement

if(u<=100)
charge=u*1.35;
else if(u=>100&&开发者_StackOverflow;u<=200)

What's wrong with this last statement? It is showing an error.


would help if you mentioned what language this is for but probably you should be using >= instead of =>


if (u <= 100) charge = u * 1.35; else if (u >= 100 && u <= 200)


else if(u=>100&&u<=200)
         ^^-- here 

shouldn't the indicated portion be >=? As well, if that's the entirety of the code, you're missing something for this else if to act on...

if (...) {
   ...
else if (...) {
   you're missing this part here
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜