开发者

Error is showing on else if and && statement

开发者 https://www.devze.com 2023-03-01 15:53 出处:网络
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 i
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

精彩评论

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