Can't put into the right words for what I need to ask, so I'll explain what's going on.
Say an internet charge costs $9.95 a month for up to 10 hours of use. There's an additional $2.00 per hour after that.
I can't get my program to calculate that correctly. The whole program executes perfectly, except for that bit. For 11 hours, the amount should be $11.95, for 12 hours, it's $13.95, etc.
All of my switch statements are set up like this. This is just the first one:
I've initialized int extraHours = 0. I thought that by multiplying the counter by 2.00 would add that amount to the charge, but for each extra hour over 10, the amount is still only an extra $2.
Is my full code really needed? I only need a push in the right direction for how to do this calculation.
Because I was trying to use a counter, yeah? I thought so, I just couldn't think of how to get the amount of extra hours. Can't believe it was that simple. Thank you. I tried everything except subtracting. Right in my face.