Consider the code below it is a simple menu driven system

#include
/* Function prototypes */
void fnOption1(void);
void fnOption2(void);
void fnOption3(void);

int main(void)
{
int nChoice = 1; /* Need an initial value */

while(nChoice != 4)
{
printf("nMain Menu ...n");
printf("1 Option 1n");
printf("2 Option 2n");
printf("3 Option 3n");
printf("4 Exitnn");
printf("Please enter your choice : ");
scanf("%d", &nChoice);
printf("n");

switch(nChoice)
{
case 1: fnOption1();
break;

case 2: fnOption2();
break;

case 3: fnOption3();
break;

case 4: break;

default: printf("Invalid input, please try againnn");
}
}
return 0;
}


void fnOption1(void)
{
printf("nYou selected Option1n");
}

void fnOption2(void)
{
printf("nYou selected Option2n");
}

void fnOption3(void)
{
printf("nYou selected Option3n");
}

Using this code as a starting point extend it as follows:

  • Add the array code from Wk8Ex5.c and extend the array size and values such that more employees are added to 10. The employee numbers used should be unique. The values used for salary should include a number of repeated values.
  • Populate the 2D array and output the values to confirm correct population.
  • Allow the user to select the following searches.
    • Search by Employee Number.
    • Search by Employee Salary single value and outputting all repeated values.
    • Search by a Salary range outputting all values within the range.
  • Any output should be formatted appropriately and include both Employee Number and Salary.
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.