Question: need help for c++ So far i have this code that works #include using namespace std; int main() { char package, month; double hours, total;

need help for c++

So far i have this code that works

#include

using namespace std; int main() { char package, month; double hours, total;

cout > hours; cout > package; if (hours > 0 && hours

switch(package) { case 'a': case 'A': if (hours > 10) { total = (hours - 10) * 2 + 9.95; cout 20) { total = (hours - 20) * 1 + 14.95; cout

}

but when i try to add anything about having the user input the month for which they are using the code doesn't work properly.

It just runs through all the code without letting the user enter input which package number and hours they used

for example if i change

cout >hours;

to

cout > month>>hours;

after adding a char month variable it wont work properlyneed help for c++ So far i have this code that works

Problem An cell phone provider has three different subscription packages for its customers Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour. For $14.95 per month 20 hours of access are provided. Additional hours are $1.00 per Package B: hour Package C: For $19.95 per unlimited access is provided Write a program to ask which package the customer has purchased, what month they are using and how many hours were used Determine maxHours, Months with 30 days have 720 hours, and months with 31 days have 744 hours February, with 28 days, has 672 hours Month January February March April June July August September October November December Input validation: Be sure the user only selects package A, B, or C. Also, the number of hours used in a month cannot exceed maxHours (or be less than 0) Days 31 28 31 30 31 30 31 31 30 31 30 31 Hours 744 672 744 720 744 720 744 744 720 744 720 744 Display the charge for the Package chosen Display how much money Package A customers would save if they purchased packages B or C; how much money Package B customers would save if they purchased packages A or C; and how much Package C customers would save if they purchased packages A or B If there would be no savings, no message should be printed

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!