Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using C++. Declare an int array List of size 5. Input five numbers in the array List. Input an integer N. Find out if
Using C++. Declare an int array List of size 5. Input five numbers in the array List. Input an integer N. Find out if N is in List. If N is found in the list, then display its index and how many times it was found in List, otherwise output that N was not found. Sample Input / Output: Enter 5 values: 4 1 20 4 7 Enter a number: 4 4 was found at index: 0, 3 4 was found in the array List 2 time (s). Enter 5 values: 10 20 5 4 9 Enter a number: 20 20 was found at index: 1 20 was found in the array List 1 time (s). Enter 5 values: 10 20 5 3 60 Enter a number: 65 65 was not found in the array List.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
C include using namespace std int main int List5 int N Input five numbers into the array List cout Enter 5 values for int i 0 i 5 i cin Listi Input an integer N cout Enter a number cin N Find if N is ...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