Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database And Transact SQL

Authors: Lucy Scott

1st Edition

1974679985, 978-1974679980

More Books

Students also viewed these Databases questions

Question

4. Does cultural aptitude impact ones emotional intelligence?

Answered: 1 week ago

Question

7. Do the organizations social activities reflect diversity?

Answered: 1 week ago