Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CPUMenu()
- {
- int choice = 0;
- ItemDetails oItemDetails[4];
- string sItemName = "";
- double dPrice = 0;
- int iStockLevel = 0;
- string sCorrectItem = "yes";
- string sCorrectItemInput = "";
- bool bCorrectItem = 0;
- ItemDetails oItemDetails1;
- string sItemName = "Selection1";
- double dPrice = 400;
- int iStockLevel = 2;
- ItemDetails oItemDetails2;
- string sItemName = "Selection2";
- double dPrice = 300;
- int iStockLevel = 3;
- ItemDetails oItemDetails3;
- string sItemName = "Selection3";
- double dPrice = 200;
- int iStockLevel = 0;
- ItemDetails oItemDetails4;
- string sItemName = "Selection4";
- double dPrice = 200;
- int iStockLevel = 4;
- do
- {
- system("cls");
- DisplayCPUMenu();
- choice = GetInput();
- if (sCorrectItemInput == sCorrectItem)
- {
- bCorrectItem = 1;
- DisplayGPUMenu();
- switch (choice)
- {
- case 1:
- cout << "You have selected the Core i7-7700K 4.0GHz (Skylake) this costs 400! Is this the correct prodcut?"; oItemDetails1;
- cin >> sCorrectItemInput;
- break;
- case 2:
- cout << "You have selected the Core i7-6700K 4.0GHz (Skylake) this costs 300! Is this the correct product?"; oItemDetails2;
- cin >> sCorrectItemInput;
- break;
- case 3:
- cout << "You have selected the Core i5-6600K 3.9GHz (Skylake) this cost 200! Is this the correct product?"; oItemDetails3;
- cin >> sCorrectItemInput;
- break;
- case 4:
- cout << "You have selected the Core i5-6400 2.70GHz (Skylake) this cost 200! Is this the correct product?"; oItemDetails4;
- cin >> sCorrectItemInput;
- break;
- case 5:
- system("cls");
- default:
- break;
- }
- }
- else
- {
- cout << "Please reselect your item";
- bCorrectItem = 0;
- DisplayCPUMenu();
- }
- } while (choice != 4);
- system("PAUSE");
- _getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement