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
Math,
1 month ago
English,
1 month ago
Chemistry,
1 month ago
Hindi,
2 months ago
English,
2 months ago
Computer Science,
10 months ago
Accountancy,
10 months ago
English,
10 months ago