WAP to take customer number, name, quantity and rate as input and calculate the amount. If the amount is greater than 1500 then discount=10% of amount otherwise discount=5% of amount. Find net amount. Print customer number, name , amount, discount and net amount.
Answers
Answer:
It is true that freedom is life. Chandni preferred death in an open field to life in small hut. ... She loved her freedom so much so that she was ready to give up her life for it. In the chapter, “I want Something in a Cage”, the man spent all the money that he had to buy the doves in a cage.
Answer:
#include<stdio.h>
#include<conio.h>
int main()
{
float amount, discount, amountToBePaid;
printf("How much shopping amount you have done here ? ");
scanf("%f", &amount);
printf("\n");
if(amount<=100)
printf("You have to paid: %0.2f", amount);
else
{
if(amount>100 && amount<=200)
{
discount = (amount*5)/100;
amountToBePaid = amount-discount;
printf("After applying the discount, you have to paid: %0.2f", amountToBePaid);
}
else if(amount>200 && amount<=400)
{
discount = (amount*10)/100;
amountToBePaid = amount-discount;
printf("After applying the discount, you have to paid: %0.2f", amountToBePaid);
}
else if(amount>400 && amount<=800)
{
discount = (amount*20)/100;
amountToBePaid = amount-discount;
printf("After applying the discount, you have to paid: %0.2f", amountToBePaid);
}
else
{
discount = (amount*25)/100;
amountToBePaid = amount-discount;
printf("After applying the discount, you have to paid: %0.2f", amountToBePaid);
}
}
getch();
return 0;
}