Junaid Mahmud wrote:I am having some trouble with this program. It is suppose to print out the fine of an item from the library depending on the days it is overdue. Books cost 50 cents a day, magazines are 25 cents and dvds are 1.50. If you are over the age of 70 there is no fine and if you are between the ages of 6 and 17 the max fine is 1.00. Anyone else can have a max fine of 5.00. This is what I have so far.
Where exactly are you having problems in your code? When you compiled and ran the program what are you getting? Yes, you have told us what you wanted, but what error are you getting?
Moreover, did you notice that your code is not completely showing up? Please fix accordingly.
I did see this piece of code that probably doesn't do what you want it to do:
Think about what the if statement is doing. What will it do if age is 5? 10? 20?