Question
C++ program. Write a program that stores numbers from a user defined range in an array of size 200 Your program should Call a function
C++ program.
Write a program that stores numbers from a user defined range in an array of size 200
Your program should
Call a function asking the user for both the min value and the max value of the numbers (note max value in the file I'm giving you is 1000). Make sure your min is less than your max!
Call a function to fill the array from a file called numbers.txt until you have filled in the 200 numbers from that range
Ask the user for a number in the required range, the
Call a function that:
The function accepts 3 arguments - the array, the size of the array and the user's number to search the array
It should then print the location (index) of the users number or not found if it is not in the array
Next print a menu asking:
Print (O) dds - if this is selected print all the odd numbers
Print (E)vens - if this is selected print all the even numbers
Print (L)ower - if this is selected print all the numbers less than the user's number
Print (H)igher -if this is selected print all the numbers greater than the user's number
Quit
And then perform the requested action. Note the letters inside the parentesis are the expected input.
Note: You will need many functions. Make sure your location function matches the description above, the others can be as you design them
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started