Originally Posted by oracleguy
Ok, so you are only setting the rate and subtotal if the days are greater than 6. You need to do it even if the days are less. Add an else to calculate the subtotal if there is no discount for the number of days.
You can figure this out by stepping line by line through the program and inspecting the variables, inside the number of weeks if block you can see that the subtotal variable is 0 which means it was never assigned to.
Hey thanks alot.
I knew it had to be something like(days < 6 because it wasn't calculating it right) that and I swear I tried something like that before and it still wasn't working, but now for some reason I tried it again and now everything works fine.
Btw for future use how do I step through the program. For example if I set a break point at say line 200 how do I step through each line to check my code?
I'm a little rusty and I don't do this everday, so I need a refresher.