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
this is the code i have been doing on so far
#include <iostream> using namespace std; int main () { double packageA, packageB, packageC; int input, hours, month; packageA= 200.00; packageB= 500.00; packageC= 900.00; cout<<"Enter package [A,B,C]: "; cin>> input; cout<<"\nEnter the month(in number): "; cin>> month; cout<<"\nEnter the number of hours used: "; cin>> hours; if (input == 'A' && hours<=10) cout<< "\nTotal amount due is: "<<packageA; else if (input == 'A' && hours > 10 && hours <=744) cout<< "\nTotal amount due is: "<<(packageA + (hours - 10) * 2); else if (input == 'B' && hours <=20) cout<< "\nTotal amount due is: "<<packageB; else if (input == 'B' && hours > 20 && hours <=720) cout<< "\nTotal amount due is: "<<((packageB) + (hours - 20) * 1); else cout<< "\nTotal amount due is: "<<packageC; return 0; } /*months with 31 days:1,3,5,7,8,10,12;hours max is 744 months with 30 days:4,6,9,11;hours max is 720 months with 28 days:2;hours max is 672 Package A: For Php200.00 per month, 10 hours of access are provided. Additional hours are Php15.00 per hour. Package B: For Php500.00 per month, 20 hours of access are provided. Additional hours are Php10.00 per hour. Package C: For Php900.00 per month, unlimited access is provided.*/
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.