Answered step by step
Verified Expert Solution
Question
1 Approved Answer
USE C++ AND DO NOT USE AND IF OR ELSE STATEMENTS USING C++ For THIS you CANNOT use any if else statement. You have to
USE C++ AND DO NOT USE AND IF OR ELSE STATEMENTS
USING C++ For THIS you CANNOT use any if else statement. You have to use switch case statements to solve it. Hint: It's not possible to check a condition in switch case. You can use mathematical operations to get a single value and use switch case Example 155/151_(High Price) 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 exitStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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