Advertisement
Appleqt

Untitled

Sep 19th, 2022
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6. int quantity;
  7. double price, total;
  8. {
  9. int count=0;
  10. int ext=0;
  11. int option=0;
  12. float price=0;
  13. int n1=0,n2=0,n3=0;
  14. while(ext>=0){
  15. cout<<"\n MENU ";
  16. cout<<"\n1. ICU Monitor $159.99";
  17. cout<<"\n2. Get'er Done! Monitor $179.99";
  18. cout<<"\n3. Gamer's Delight Monitor $249.99";
  19. cout<<"\n4. Checkout";
  20. cout<<"\nEnter the option (1-4): ";
  21. cin>>option;
  22. if (option>0 && option <5)
  23. {
  24. count=count+1;
  25. if (option==1) {
  26. n1=n1+1;
  27. price= price +159.99;
  28. cout<<"Enter Item Quantity: ";
  29. cin>>quantity;
  30. price=quantity*price;}
  31.  
  32. else if (option==2)
  33. {n2=n2+1;
  34. price= price +179.99;
  35. cout<<"Enter Item Quantity: ";
  36. cin>>quantity;
  37. price=quantity*price;}
  38. else if (option==3)
  39. {n3=n3+1;
  40. price= price +249.99;
  41. cout<<"Enter Item Quantity: ";
  42. cin>>quantity;
  43. price=quantity*price;}
  44. else if (option==4)
  45. if (option == 4)
  46. break;
  47.  
  48. }
  49. else
  50. cout<<"\nInvalid option " ;
  51.  
  52. }
  53.  
  54. cout<<"\nTotal Cost of Monitors: $"<< price ;
  55. cout<<"\nSales Tax (calculated at 6.5%): $"<<price*6.5/100;
  56. cout<<"\nBalance Due: $" <<price +price*0.065;
  57.  
  58. return 0;
  59. }
  60. }
  61.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement