Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Data types
- #include<iostream>
- using namespace std;
- main()
- {
- //variables
- char csh[80];
- string prod1; double qty1; double price1, total1=0;
- string prod2; double qty2; double price2, total2=0;
- double total3= 0;
- string cashier;
- //User
- cout<<(" Enter Cashier Name : "); cin>> cashier;
- cout<<(" Enter Product Name: "); cin>> prod1;
- cout<<(" Enter Quantity: "); cin>> qty1;
- cout<<(" Enter Price: "); cin>> price1;
- //formula
- total1= qty1*price1;
- cout<<"total: "<<total1;
- cout<<(" Enter Product Name: " ); cin>> prod2;
- cout<<(" Enter Quantity: "); cin>> qty2;
- cout<<("Enter price:"); cin>> price2;
- total2= qty2*price2;
- cout<<"total: "<<total2;
- cout<<("\n\nCashier \t Product Name \t Quantity \tPrice\tTotal\n\n");
- cout<<prod1 <<" " <<qty1 << " "<< price1 <<" "<<total1;
- cout<<prod2 <<" " <<qty2 << " "<< price2 <<" "<<total2;
- cout<<"\t"<<prod1; cout<<"\t "<<qty1; cout<<"\t "<<price1; cout<<"\t "<<total1;
- cout<<"\t"<<prod2; cout<<"\t "<<qty2; cout<<"\t "<<price2; cout<<"\t "<<total2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement