Computer Science, asked by viratx32, 4 months ago

Q7. WAP to calculate Payment Amount and Discount Amount of a sale value according to
following conditions.
Sale Value (SV)
In CASH
With CARD
SV<5000
No
No
SV>=5000 and SV<10000
No
5% Discount
SV>=10000 and SV<30000
5% Discount
10% Discount
SV>=30000 and SV<=40000
10.5% Discount
20% Discount
Above 40000
Refers to Manger
Refers to Manger​

Answers

Answered by lalitnit
1

Answer:

#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.10;

}

else if(amount > 1000)

{

discount=amount*0.05;

}

else

{

discount=0;

}

amount = amount - discount;

printf("%lf",amount);

return 0;

}

Similar questions