Write a C program to calculate the bill amount for an item given its quantity sold, value, discount (declare as constant) and tax (declare as constant).

#include < stdio.h>
#define discount 0.02
#define tax 0.01
int main()
{
float quantity,price,amount,tot_amount;
printf("Enter quantity and price:");
scanf("%f%f",&quantity,&price);
amount=quantity*price;
tot_amount = amount + (amount*tax) - (amount * discount);
printf("Total amount to be paid is %f",tot_amount);
return 0;
}