Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. void CPUMenu()
  2. {
  3. int choice = 0;
  4. ItemDetails oItemDetails[4];
  5. string sItemName = "";
  6. double dPrice = 0;
  7. int iStockLevel = 0;
  8. string sCorrectItem = "yes";
  9. string sCorrectItemInput = "";
  10. bool bCorrectItem = 0;
  11.  
  12.  
  13. ItemDetails oItemDetails1;
  14. string sItemName = "Selection1";
  15. double dPrice = 400;
  16. int iStockLevel = 2;
  17.  
  18.  
  19.  
  20. ItemDetails oItemDetails2;
  21. string sItemName = "Selection2";
  22. double dPrice = 300;
  23. int iStockLevel = 3;
  24.  
  25.  
  26.  
  27. ItemDetails oItemDetails3;
  28. string sItemName = "Selection3";
  29. double dPrice = 200;
  30. int iStockLevel = 0;
  31.  
  32.  
  33.  
  34. ItemDetails oItemDetails4;
  35. string sItemName = "Selection4";
  36. double dPrice = 200;
  37. int iStockLevel = 4;
  38.  
  39.  
  40. do
  41. {
  42. system("cls");
  43. DisplayCPUMenu();
  44. choice = GetInput();
  45.  
  46.  
  47. if (sCorrectItemInput == sCorrectItem)
  48. {
  49. bCorrectItem = 1;
  50. DisplayGPUMenu();
  51. switch (choice)
  52. {
  53. case 1:
  54. cout << "You have selected the Core i7-7700K 4.0GHz (Skylake) this costs 400! Is this the correct prodcut?"; oItemDetails1;
  55. cin >> sCorrectItemInput;
  56. break;
  57. case 2:
  58. cout << "You have selected the Core i7-6700K 4.0GHz (Skylake) this costs 300! Is this the correct product?"; oItemDetails2;
  59. cin >> sCorrectItemInput;
  60. break;
  61. case 3:
  62. cout << "You have selected the Core i5-6600K 3.9GHz (Skylake) this cost 200! Is this the correct product?"; oItemDetails3;
  63. cin >> sCorrectItemInput;
  64. break;
  65. case 4:
  66. cout << "You have selected the Core i5-6400 2.70GHz (Skylake) this cost 200! Is this the correct product?"; oItemDetails4;
  67. cin >> sCorrectItemInput;
  68. break;
  69. case 5:
  70. system("cls");
  71. default:
  72. break;
  73. }
  74. }
  75. else
  76. {
  77. cout << "Please reselect your item";
  78. bCorrectItem = 0;
  79. DisplayCPUMenu();
  80.  
  81. }
  82.  
  83.  
  84. } while (choice != 4);
  85. system("PAUSE");
  86. _getch();
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement