Question
Write a C file that computes the statistics of and sort a series of stock prices. The algorithms and file name are listed below. put
Write a C file that computes the statistics of and sort a series of stock prices. The algorithms and file name are listed below.
put inside it these files: Makefile, stocks.c, stats.c,io.c, io.h, stats.h
Prototypes for user defined functions are:
1 float get_average(const float data[], const int size);
2 float get_variance(const float data[], const int size);
3 float get_max(const float data[], const int size);
4 float get_min(const float data[], const int size);
5 void sort(const float input[], float output[], const int size, const char order);
6 float get_median(const float input[], const int size);
7 void read_data(float array[], int size);
8 void print_results(const float array[], int size, float mean, float median, float min, float max, float variance);
9 void print_greeting();
io.h & io.c contains the prototypes and implementation of input/output functions - functions that interact with the user
stats.h & stats.c contains the prototypes and implementation the rest of the functions - the ones that do the computations
stocks.c is the main program
Do not use the pow function or any other mathematical functions. Dont use pointers either.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started