Write a python program to accept price of an item and number of quantities sold. If
quantity sold is more than 500, then give them a discount of 10%. If quantity sold is less
than or equal to 500 or more than 250, then give them a discount of 5%. Finally display the amount payable.
Hey mates..pls help me out ..I'll mark the best answer as brainliest.
Answers
Answered by
5
#include <stdio.h>
int main(void)
{
double quantity,price,amount,discount;
printf("Enter Quantity and Price:");
scanf("%lf %lf",&quantity, &price);
amount=quantity*price;
if(amount>5000)
{
discount=amount*0.05;
amount=amount-discount;
}
printf("%lf",amount);
return 0;
}
PLEASE try out this
agar output nahi aaya to batao
Mai phirse karta hun
Similar questions
Computer Science,
8 days ago
Social Sciences,
8 days ago
Hindi,
16 days ago
English,
16 days ago
Accountancy,
7 months ago
English,
7 months ago