Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- int quantity;
- double price, total;
- {
- int count=0;
- int ext=0;
- int option=0;
- float price=0;
- int n1=0,n2=0,n3=0;
- while(ext>=0){
- cout<<"\n MENU ";
- cout<<"\n1. ICU Monitor $159.99";
- cout<<"\n2. Get'er Done! Monitor $179.99";
- cout<<"\n3. Gamer's Delight Monitor $249.99";
- cout<<"\n4. Checkout";
- cout<<"\nEnter the option (1-4): ";
- cin>>option;
- if (option>0 && option <5)
- {
- count=count+1;
- if (option==1) {
- n1=n1+1;
- price= price +159.99;
- cout<<"Enter Item Quantity: ";
- cin>>quantity;
- price=quantity*price;}
- else if (option==2)
- {n2=n2+1;
- price= price +179.99;
- cout<<"Enter Item Quantity: ";
- cin>>quantity;
- price=quantity*price;}
- else if (option==3)
- {n3=n3+1;
- price= price +249.99;
- cout<<"Enter Item Quantity: ";
- cin>>quantity;
- price=quantity*price;}
- else if (option==4)
- if (option == 4)
- break;
- }
- else
- cout<<"\nInvalid option " ;
- }
- cout<<"\nTotal Cost of Monitors: $"<< price ;
- cout<<"\nSales Tax (calculated at 6.5%): $"<<price*6.5/100;
- cout<<"\nBalance Due: $" <<price +price*0.065;
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement