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;
- //prod1
- cout<<(" Enter Cashier Name : "); cin>> cashier;
- cout<<(" Enter Product Name: "); cin>> prod1;
- cout<<(" Enter Quantity: "); cin>> qty1;
- cout<<(" Enter Price: "); cin>> price1;
- //secretformula
- total1= qty1*price1;
- cout<<" Total: "<<total1;
- //prod2
- cout<<("\n Enter Product Name: " ); cin>> prod2;
- cout<<(" Enter Quantity: "); cin>> qty2;
- cout<<("Enter price:"); cin>> price2;
- total2= qty2*price2;
- cout<<"total: "<<total2;
- cout<<("\n\nProduct Name \t Quantity \tPrice\t\tTotal\n\n");
- cout<<prod1 <<"\t\t" <<qty1 << "\t\t"<< price1 <<"\t\t"<<total1;
- cout << endl;
- cout<<prod2 <<"\t" <<qty2 << "\t "<< price2 <<"\t "<<total2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement