Product number, price of each item and quantity are taken from the user and dicount and net ammount is calculated.
Bill is Displayed as follows:
Product ID:
Quantity:
Total ammount:
Discount:
Net ammount:
Select To use this code as it is.. select and copy paste this code into code.cpp file :)
- #include <iostream.h>
- #include <conio.h>
- void main()
- {
- clrscr();
- int id,qty;
- float tot,amt,price,dis;
- cout<<"Enter Product ID: ";
- cin>>id;
- cout<<"Please Enter Quantity: ";
- cin>>qty;
- cout<<"Please Enter Price per ITEM: INR ";
- cin>>price;
- tot=qty*price;
- dis=.3*tot;
- amt=tot-dis;
- //Coding by: Snehil Khanor
- //http://WapCPP.blogspot.com
- cout<<"\n\n\nProduct ID: "<<id<<"\nQuantity: "<<qty<<"\nPrice Per ITEM: INR
- "<<price<<"\nTotal amt: INR "<<tot<<"\nDiscount @ 30% : INR "<<dis<<"\nNet
- Ammount: INR "<<amt;
- getch();
- }
0 comments:
Post a Comment