Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In C++ code please Write a function that verifies if a given number exists in an array of floats. The function is supposed to return
In C++ code please
Write a function that verifies if a given number exists in an array of floats. The function is supposed to return the first position in where the number is encountered. If the given number does not exist, the function returns -1.Then write a program that asks the user to enter an array of floats and calls the function. The prototype of the function should be like: int Search (floats al I, int n, float number) Example: Consider the following array of floats 211 9 -14 17.3 5.9 9 17 0 If the number to be searched is 5 4 the function returns1 If the number to be searched is 9 the function retuns 2Step by Step Solution
There are 3 Steps involved in it
Step: 1
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