See title. The list of values is:
First 30 minutes FREE
31 to 60 minutes $2.00
Each additional 30 minutes $1.00
Up to seven hours $14.00
Thereafter, each hour $1.00
24-hour maximum $21.00
Below is a smaller test snippet of this program. I have a full one, and both of them have the same problem- if 60 or over is the entered value, it always prints 2 when it should print 3 or higher. Please help.
So that fixes your problem. Remember, the "else" by itself should basically only come at the end of the 'main' if statement.
Also, you can't do the (parkingtime>=31<=60). It just doesn't work that way. You have to separate them. I'm new so I don't know how the compiler even reads that as correct, but apparently it does. lol. But, it gives you the wrong answer.
I'm still having trouble as I applied the fix to my main program and now it always prints 3. Not all of the values in the main program are done yet but it's still broken... Please help.
Look at where it is between 61 and 90. . . .then look at your next "else if" -- it starts at >=90. . . but that's wrong because the previous one is <=90.
Add one to all the >= ifs, starting with "90" and your problem will be fixed.