Question: Create a program using C++ code Exercise 3: Arrays with File Input Create an empty text document name input.td and copy the example contents from
Exercise 3: Arrays with File Input Create an empty text document name "input.td" and copy the example contents from below 185 15 20 35 47 The first value in the file tells you how many ints (the type must be int!) are in the fle. The rest of the values are the ints you want to store Create a program that reads in the first value, always an int, that tells you how many values are in the file. Then, areate an array to store all of those values After you've read in the values display them to the screen in the following format Contents of input.txt (1e5, 15, 20, 35, 47) Input a value to search for The search prompt obtains a value from the user and confims whether or not it is in the array Example Contents of input.txt: [1e5, 15, 20, 35, 47 Input a value to search for: 5 5 is not in the array Do you wish to quit (y):n Input a value to search for: 185 105 is in the array. Do you wish to quit (y): y Let the user search as many times as they want
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
