the method takes two parameters, the whole array and an element to search. The method returns the index of the element if found, and -1 if not found. Now, you are asked to write a program that has a method FindMatch() that does exactly the same thing: 1) The Main() calls FindMatch(). 2) FindMatch() takes two parameters: 1) the whole array of integer test scores { 85, 98, 100, 73, 67, 82, 92, 87 }, and 2) an element to search from users input. 3) FindMatch() returns the index of element if found back to the Main(), and -1 if not found. The method should not use IndexOf() to do the search. 4) The program displays either the index or -1 in the Main(). Sample output (from Microsoft Visual Studio) as shown below

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter5: The Repetition Structure
Section: Chapter Questions
Problem 2MQ2: Rewrite the Loop clause from Question 1 using the Until keyword.
icon
Related questions
Question

Use C#.

Chapter 6 discussed the predefined IndexOf() method of an array; the method takes two parameters, the whole array and an element to search. The method returns the index of the element if found, and -1 if not found. Now, you are asked to write a program that has a method FindMatch() that does exactly the same thing:


1) The Main() calls FindMatch().


2) FindMatch() takes two parameters: 1) the whole array of integer test scores { 85, 98, 100, 73, 67, 82, 92, 87 }, and 2) an element to search from users input.


3) FindMatch() returns the index of element if found back to the Main(), and -1 if not found. The method should not use IndexOf() to do the search.


4) The program displays either the index or -1 in the Main().


Sample output (from Microsoft Visual Studio) as shown below

Please enter the score >> 92
The score is found in index 6
Press any key to continue . .
Transcribed Image Text:Please enter the score >> 92 The score is found in index 6 Press any key to continue . .
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
Arrays
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
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage