Write a program in which you input item name,rate and quantity bought and then calculate the bill amount.Add 12.5% as VAT and find the net bill
Answers
The body of the concerned program in C++ is as follows:
{
double rate,quantity,vat,bill;
string name;
cout<<"Enter name , rate and quantity bought";
cin>>name>>rate>>quantity;
vat=12.5*(rate*quantity)/100;
bill=(rate*quantity) + vat;
cout<<"Bill amount is equal to "<< bill;
}
- The variables name, rate, quantity, vat and bill are used to store the name of the customer, the rate of the product, number of quantities of the product bought, vat imposed and the net bill amount respectively.
Answer:
The body of the concerned program in C++ is as follows:
{
double rate,quantity,vat,bill;
string name;
cout<<"Enter name , rate and quantity bought";
cin>>name>>rate>>quantity;
vat=12.5*(rate*quantity)/100;
bill=(rate*quantity) + vat;
cout<<"Bill amount is equal to "<< bill;
}
The variables name, rate, quantity, vat and bill are used to store the name of the customer, the rate of the product, number of quantities of the product bought, vat imposed and the net bill amount respectively.
Explanation: