Question: c programming seashell LANGUAGE FEATURES: For this question, you may use the double type Write the following two functions (in two separate programs) Both functions

c programming seashell

c programming seashell LANGUAGE FEATURES: For this question, you may use the

LANGUAGE FEATURES: For this question, you may use the double type Write the following two functions (in two separate programs) Both functions read ints until a failure occurs and return the number of ints successfully read. If no ints were successfully read in, the functions return zero and do not modify (mutate) the contents of any of the parameters. Otherwise, the functions mutate the contents of their (pointer) parameters as follows: a. int read_and_range(int "max, int *min, int "count_max, int *count_min) *max: the largest number that was successfully read o o *min: the smallest number that was successfully read *count_max: the number of times the largest number was read o count_min: the number of times the smallest number was read b. int read_and_calc_stats(int sum, double "mean, double *var) o sum: the sum of the numbers that were successfully read o *mean: the average of the numbers that were successfully read o *var: the variance of the numbers that were successfully read (see below) To calculate the mean and variance of a population of N members x1 .. XN, use the formulas: mean -(x1+xN)/N variance (x12 + +xN2)/N - (mean)2 If N is one, then the variance is zero. PRO TIP: To calculate the value of a/b as a double, where a and b are both ints, do not simply write double result - al bi as that will still use integer division. Instead, write: double result = a; result- result /b; ASIDE: If you're curious, there is an alternative formula for calculating the variance of a sample using (N 1) instead of (N). You can read about this idea called Bessel's correction. For this question, the marmoset basic tests ("public" tests) will use the main function and simple test files provided

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!