Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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_2

Step: 3

blur-text-image_3

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

Big Data Concepts, Theories, And Applications

Authors: Shui Yu, Song Guo

1st Edition

3319277634, 9783319277639

More Books

Students also viewed these Databases questions

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago