Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is C++ program. For this problem you CANNOT use if, else. ONLY use the SWITCH/CASE statements approach Problem Definition: Write a program to decide
This is C++ program. For this problem you CANNOT use if, else. ONLY use the SWITCH/CASE statements approach Problem Definition: Write a program to decide the price group of a book. The user can type the price of a book. Your program has to decide which group the book belongs to. High price group consists of books which cost more than $150. Low price group consists of books which cost less than $50. Everything else belongs to the mid-price group. Add necessary text before input for making the program user-friendly Sample Input: 151 Sample Output: This book belongs to the high price group. Sample Input: 50 Sample Output: This book belongs to the mid price group. Sample Input 34 Sample Output: This book belongs to the low price group. For Extra Credit: The user can input the prices of multiple books separately. The program has to decide the price group for each book. After displaying the price group of a book user will enter 'c' to continue with the program or'e' to exit the program. The program will continue as long as the user does not choose to exit
For this problem you CANNOT use if, else.
ONLY use the SWITCH/CASE statements approach
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started