Question: Write a program that asks the user to input 1 ) the month and year ( input into one string variable ) , and 2

Write a program that asks the user to input 1) the month and year (input into one string variable), and 2) the number of people who have registered to attend.
Calculations:
1) For each item calculate the number of packages needed. For example, if there are 102 people who registered, then three bags need to be ordered but if only 100 register you will only need to order two packages.
Since if statements have not been introduced yet (and you are not to use constructs not yet taught in the class) you should instead make integer division your friend. In the case of the pens, they come in packages of 50.
Case of 100 people registered: (100+501)/50 in integer division is truncated to 2(that is,149/50=2)
Case of 102 people registered: (102+501)/50 in integer division is truncated to 3(that is,151/50=3)
I leave the formula for bags and notebooks for you to figure out. This kind of thinking is very helpful in finding creative solutions to problems you will encounter in computer science/data science.
2) Calculate the total for each item. Each of the unit cost prices must be declared in main() as memory constants.
3) Calculate the subtotal of all three items.
4) Calculate tax. The tax rate is to be set with a global preprocessor directive as 9.13%.
5) Calculate the total cost of the order, subtotal plus the tax.
=> Note: Use this sample output below to check your output
Output:
Month and year. Then for each item output description, number of packages to be ordered, and total cost for that item. Then output the subtotal for the order, amount for tax, and the total for the entire order including tax.Month and year. Then for each item output description, number of packages to be ordered, and total cost for that item. Then output the subtotal for the order, amount for tax, and the total for the entire order including tax.
Enter Month and Year: April 2023
Enter Number of RSVPs received: 347
Decimal points must be lined up beautifully. This means you need to use iomanip, setprecision(), fixed, setw() at minimum. If you pad the literal strings with spaces you will not need left and right.
Absolutely no global variables. Declare variables in function main()
Use no constructs (loops, arrays, structures, classes, etc) that have not yet been taught in the course

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 Programming Questions!