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
}
精彩评论