Question: Write the code fragment that will do the following: Ask the user how many numbers they want to enter. Create an integer array to hold
Write the code fragment that will do the following:
Ask the user how many numbers they want to enter.
Create an integer array to hold as many elements as the number entered by the user.
Write one loop to populate the entire array with data provided by the user prompt the user to enter data
Ask the user which number they want to search in the array.
Write another loop to check if the number is present in the array.
If the number is present display a message stating "Number present in the array" else display "Number not present in the array.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
