C++
Hands-on Exercise #8 - Chapter 8 I n reach.cpp from the Lab The desig och my entry is checked to set it contain contis returned to indicate the location in the Rew them Iewed fix will that the c o mpute that will s tand the program Shop We got 9900 teet The lettere is in the position of the list Excel: Rewrite this program so that it scarches an array of integers rather than characters. Search the integer way 36. 1930 299 for several different integers. Make sure you try integers that we in the array and others that are not. What happens if you search for 3? Enter a number to search for The number is in the position of the list Exercise 2: Re-write the program so that the user can connue to input values that will be searched for, until a sentinel vais entered to end the program. Should a pre or post test loop be used? Sample Rew: Enter a number to search for enter -99999 to exit The number is in the position of the list The number is in the 1 position of the list har antar -9191 to it Enter a number to search for: enter -99999 teeni Exercise 3: Modify your program from Exercise Iso that it reads the information from the geadfile.txt file, reading until the end of file is countered. You will need to first retrieve this file from the Lab 7 folder and place it in the same folder as your source code. Run the program. Sample Ron: CPSC 230 The urades read is from the file are:98 The grades read is from the site are:73 The grades read is from the file are:21 The grades read is from the site are 162 er a research for: Orter -99999 TO E The Number 21 is in the position of the list Fater a r ve Search for: Or Enter -99999 5e Exit The Number 78 is in the 1 position of the list er a Tears for Or Enter -99992 Later a Humber to search for: Ov Inter -99999 to Exit The Member 1999 was not found in the list Enter a Munker te seh r Inter-1992 E