Question: According to the integer type array and the number of elements of the array sent to it; Write the function called Find Near to the
According to the integer type array and the number of elements of the array sent to it; Write the function called Find Near to the average that produces the average itself, index, and average of the first number that is closest to the average (may be equal) in the array, in accordance with the following main function and sample output. (A pointer must meet the array in the function, and a global variable should not be used.)
include ........
......................................./*Prototype*/
int main ()
{
int sequ [9] = {9, 7, 3, 4, 11, 67, 25, 56, 34};
int index;
int element;
float average;
Find Near to Mean (............................);
printf (Average:% .2f \ n, average);
printf (Nearest element:% d \ n, element);
printf (Index:% d \ n, index);
return 0;
}
OUTPUT
Average: 24.00
Closest employee: 25
Index: 6
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
