Question: Part I: Write the following functions: float average(int count, int array[]); //Returns the average of the elements in the array int max(int count, int array[]);
Part I: Write the following functions:
float average(int count, int array[]); //Returns the average of the elements in the array
int max(int count, int array[]); //Returns the largest element in the array
int min(int count, int array[]); //Returns the smallest element in the array
float stDev(int count, int array[]); //Returns the standard deviation of the elements in the array
void printArray (int count, int array[]); //prints every integer in the array separated by a comma //on one line
Part II: Write a function that:
Asks the user for positive integers until they enter a negative integer or they have entered 10 numbers, whichever is first.
Puts the integers into a passed in array, starting at the 0 position.
Return the number of integers entered
Part III: Write a main program that exercises each of these functions:
Ask the user for the numbers
Display the entered numbers, the average, standard deviation, min, and max for the array
Display the array sorted from lowest to highest
The following equation calculates standard deviation
Algorithm
Compare each pair of adjacent elements from the beginning of an array and, if they are in reversed order, use bubble sort to swap them.
If at least one swap has been done, repeat step 1.
Please write in language C
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
