Need a project done?

C++ Programming Developer

Search This Blog

Showing posts with label search through array. Show all posts
Showing posts with label search through array. Show all posts

Recursive function to search through array

Recursive function to search through array.

Write a program that asks the user to enter 10 integers, stores these numbers in an array. The program should ask if the user would like to search an element in the array, in which case the program should then prompt the user to enter the number to look for. Use a recursive function find( int index, int target, int array[] ) that does sequential search for a target in this array. Display an appropriate message to the user after searching the element.

Solution:
"Don't let anyone ever make you feel like you don't deserve what you want."