develop a program for a retail store that offers a discount. Write a C program
Автор: coding_master
Загружено: 2025-10-30
Просмотров: 14
You are developing a program for a retail store that offers a discount based on the total purchase amount. Write a C program that takes the total purchase amount as input and print the final amount to pay after discount given as follows:
If the purchase amount is less than 200, there is no discount.
If the purchase amount is between 200 and 500 (both inclusive), apply a 10% discount.
If the purchase amount is greater than 500, apply a 20% discount.
Input Format
First line -Total purchase amount as double.
Output Format
Print the final amount after discount as double up to two decimal place.
Sample Input
300.00
Output
270.00
Note:- For consistency in output, use double data type for variable to store decimal value.
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: