Question: If - Else - If - Statement Audlobooks.cs An online audiobook service provider has three different subscription packages for its customers: Package A: For $
IfElseIfStatement
Audlobooks.cs
An online audiobook service provider has three different subscription packages for its customers:
Package A: For $ per month, audiobooks are provided. Additional books are $ per book.
Package B: For $ per month, audiobooks are provided. Additional books are $ per book.
Package C For $ per month, unlimited audiobook access is provided.
Write a program that calculates a customer's monthly bill using an IfElseIf statement. It should:
Ask the user to enter the letter of the package the customer fias purchased A B or C
Ask the user to enter the number of audiobooks that were read
Display the total charges
Display a message indicating that the wrong input was entered ie if someone enters F
Variable declarations o Constant double variable for the following:
Each subscription base price
Book price for additional books for each relevant subscription package
Number of books included for each relevant subscription package o choice char input from user o
numBooks int input from user o totalCharges double calculated total
Other o Rename your file as Audiobooks.cs
The constant variables should replace hard coded data, including in the calculations o
Account for uppercase or lowercase input
Hint: there are a couple ways to do this:
string has a couple methods
modify your conditional statement but do not create a separate condition for upper and lowercase
Format the output to decimal places
Run and test your program
BONUS: In the ifelseif statement, only the final else condition contains a write statement.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
