Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How would I create the standard deviation function and the bonus function X is set of numbers, Xi is the ith number in the set

How would I create the standard deviation function and the bonus function image text in transcribed
image text in transcribed
X is set of numbers, Xi is the ith number in the set X and mean( X) is the mean or average of all the numbers, n is the size of the set/array Split down the formula into pieces and then do the math, it will be helpful. Implement following functions for the lab assignment. void initialiaze_array(int ", int ): This function takes an integer pointer and the input size and stores random numbers using the integer pointer. The random numbers range from the value 1 to 5 only void print array(int*, int ): This function takes an integer pointer and the input size and prints out random numbers stored in the array to which the integer pointer points to. float median (int*, int): This function like the function above takes an integer pointer and a size. It computes the median value for given set of random numbers (as explain in the example) above and returns that median value. Write your own sorting function to sort the array. All the functions above are same as the functions used in the prelab. float standard deviation (int *, int): Like the functions above it takes an integer pointer to the array of integers and size and returns the standard deviation of the numbers using the above formula. You must write your own mean function. int mainO: Like the previous labs and homework assignments first read the input size from the user perform an error check( with or without use of functions) to make sure the size of the input is betweer I and 100. Initialize integer pointers and call functions initialiaze array and print array function to store and print the random numbers. Call the remaining functions and display the results as a shown in the sample output below Note: 1. In the main declare an integer pointer and assign the address of this pointer to your initially created array 2. Use only pointer notation and pointer arithmetic to implement the assignment 3. Use the relevant library functions only, the ones you have used already. Like sqr, pow and randO (Remember the libraries you need to use)

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

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

More Books

Students also viewed these Databases questions