Structures
Design a program that uses a structure type to store a computer part’s description, quantity and price. The program should use an array of structures to store data for up to 100 computer parts.
The program should first prompt the user to select one of the following menu options:
- Get computer parts’ data
- Display parts sorted alphabetically
- Display parts where quantity is less than the given quantity
- Exit
If the first option is selected, the program should obtain data for a requested number of parts from the user and store them into the array of structures.
If option 2 is selected the program should first sort the array alphabetically by the part’s description and then display the sorted parts’ data.
If option 3 is selected the program should obtain the requested quantity of parts from the user and then display all parts where the quantity is less than the given quantity.
The program should loop back to the main menu until the exit option is selected.
Requirements:
1. Global variables/arrays are not allowed.
2. Options 2 and 3 have to be executed by calling appropriate user-defined functions.
