Write a menu driven program with the menu options: 1. Insert Numbers 2. Edit Numbers 3. Search
Question:
Write a menu driven program with the menu options:
1. Insert Numbers
2. Edit Numbers
3. Search Number
4. Print Numbers
5. Current No. of Records
6. Exit
Program should be implemented with arrays, pointers and functions. Maximum 50 numbers
are allowed by the user to enter. Each menu option should be implemented in separate
function.
Some more details about each menu option:
1. Insert Numbers
Keep asking user to add number into array one by one until user enters 0 as a number (which
means that 0 is not allowed to enter as a number). If user already added numbers before then
add numbers at the end of the array. When
maximum limit reaches then inform user about that
and do not allow entering any more numbers.
2. Edit Numbers
Ask position in array at which user want to edit the number and also ask which number user
want to replace with. When there is no number has been entered by the user at that location
then just replies with a message that the specified position is empty.
3. Search Number
Ask user to enter a number to search from the added numbers (means in array). If number is
found then tell the position of the number in the array. When the number exists at multiple
positions in array then tell no. of occurrences and their respective positions. When number is
not found then reply with a message that number does not exists in array.
4. Print Numbers
Print all numbers entered by user and their respective locations.
5. Current No. of Records
Display total numbers entered so far by the user.
6. Exit
Exit program
Introduction to Probability and Statistics
ISBN: 978-1133103752
14th edition
Authors: William Mendenhall, Robert Beaver, Barbara Beaver