Main should Ask a user to enter a spot and then a strike usi
Solution
#include<iostream>
#include<iomanip>
#include<string>
#include <fstream>
using namespace std;
const int arraySize = 1000;
double price[arraySize];
int partNo[arraySize], quantity[arraySize];
string make[arraySize], partName[arraySize];
void menu();
void option(int);
void choice1();
int main()
{
int choice=0;
while (choice != 8)// condtion choice not equal 8
{
menu();//calling menu function
cin >> choice;// enter the choice
option (choice);// calling the switch funtion and send the choice
}
return 0;
}
void menu()// menu function the have the menu output only
{
cout <<\"Inventory Control System \ \ \"
<< \"\\t [1] Add part\ \"
<< \"\\t [2] Update part \ \"
<< \"\\t [3] Remove part\ \"
<< \"\\t [4] List inventory \ \"
<< \"\\t [5] Parts whose quantity < 5 \ \"
<< \"\\t [6] Parts above a given price \ \"
<< \"\\t [7] Parts above the average price \ \"
<< \"\\t [8] Stock statistics \ \ \"
<< \"\\t [9] Exit \ \ \"
<< \"Enter your choice: \";
}
void option(int x)
{
switch(x)
{
case 1 :
choice1();
break;
case 2 :
choice2();
break;
case 3 :
choice3();
break;
case 4 :
choice4();
break;
case 5 :
choice5();
break;
case 6 :
choice6();
break;
case 7 :
choice7();
break;
case 8 :
choice8();
break;
case 9 :
choice9();
break;
default :
cout<<\"Wrong choice \ \";// if the choice were wrong
}
}

