Question: 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
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
