Write a C++  program that initializes an array of size 10 with 10 integer values between 1 and 100. The program then asks the user to enter an integer number between 1 and 100. The program will search the entered number in the array, if it is present the program displays its index in the array otherwise program displays “element not found” message.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter10: Pointers
Section10.3: Pointer Arithmetic
Problem 3E
icon
Related questions
Question

Write a C++  program that initializes an array of size 10 with 10 integer values between 1
and 100. The program then asks the user to enter an integer number between 1 and 100. The
program will search the entered number in the array, if it is present the program displays its
index in the array otherwise program displays “element not found” message.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage