Write a program to accept the cost of an article and calculate the discount and amount paid by
the customer according to the table given below :
[5]
Cost discount
Upto 1000 5% on cost price
1001 to 3000 7 % on cost price
3001 to 5000 10 % on cost price
Above 5000 15% on cost price
Answers
Answered by
3
Explanation:
Explanation required haan :o
★ Physics ★
Answered by
2
Answer:
#include<stdio.h>
#include<math.h>
int main()
{
float a,;
printf("write amount of the article :");
scanf("%f",&a);
if(a<=1000 ) {
printf("value of article after applying discount of 5 percent is %.2f\n ",a-(a*(0.05)));
}
else if (a>1000 && a<3000) {
printf("value of article after applying discount of 7 percent is %.2f\n ",a-(a*(0.07)));
}
else if (a>3000 && a<5000) {
printf("value of article after applying discount of 10 percent is %.2f\n ",a-(a*(0.10)));
}
else { printf("value of the article after applying discount of 15 percent now is %.2f\n",a-(a*(0.15)));
}
}
please mark as brainliest
Similar questions
Computer Science,
3 months ago
Economy,
3 months ago
India Languages,
6 months ago
Math,
6 months ago
Physics,
10 months ago
Political Science,
10 months ago
Physics,
10 months ago