help with if statements..

Posted 31 July 2014 - 07:00 PM

can someone help me here? here is the program description:an ISP has 3 different packages for its customers:PackageA for 250.00 per month,10 hours of access is provided.additional hours are 150/hour.PackageB for 500/month,20 hours of access,additional hours is 10/hour.PackageC with 900/month,unlimited access is provided.
the conditions in the program are:

1.user only selects packages A,B,C.
2.month entered must be a valid month.
3number of hours must not exceed the total number of hours per month based on the data below:
months with 31 days-744 hours
months with 30 days-720 hours
months with 28 days-672 hours

there are no errors when i compile it,but problem is i cant put an in put in the month and number of hours used! can someone help me?? and also how can i put the total number of hours per month as what the description says?? thank you very much.

Re: help with if statements..

Posted 01 August 2014 - 06:25 AM

Item #3 in the post is sort of a red herring. It's simply the number of hours in a day times the number of days in a month. Eg. 31 days * 24 hours/day == 744 hours. So all this means is that you'll need a lookup table to find the number of days in a month, and you can compute the maximum number of hours for that month.