Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 5 : Problem 5 : Write a program to calculate a discount based on the quantity and the price of each item of purchasing.
Problem : Problem : Write a program to calculate a discount based on the quantity and the price of each item of purchasing. The program prompts the user to insert the positive purchased number of items num should be positive and the price of each item. The program calculates the price after discount as follows:
discount
Input Output Samples:
Bnter quantity of purchasing: Invalid quantity
Enter the quantity of purchasing:
Enter the price of each item:
You have bought peices
The normal price is
The price after discount is:
Program finished with exit code
Press ENTER to exit console.
I need answer with c
Step 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