While purchasing certain items, a discount of 10% is offered by the popular super market if the quantity purchased is more than 1000.Since number of people purchasing is increasing day by day the owner of the super market feels that the discount calculation will be better if there is a automated software that gives the total expenses If the quantity and price per item are input.
#include <stdio.h>
int main()
{int price,quantity,totexp;
scanf("%d %d",&quantity,&price);
if(quantity>=1000){
totexp=0.9*price*quantity;
printf("%d",totexp);}
else{
totexp=price*quantity;
printf("%d",totexp);
}return 0;}
Comments
Post a Comment