Question: 3) I have written a program for you to complete. This problem is not to be included with the menu. Simply print when I run
3) I have written a program for you to complete. This problem is not to be included with the menu. Simply print when I run the menu program that it is included in another project. You are to write a program that outputs the mean, median, and modes. Your task is to complete the function. This will use structures to pass information from one function to the print function. using this part of the code i want write a c++ code that cab get the same output that is give down here
| Stats *stat(const Array *array){ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| //Non-working stub to be completed by the student | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cout< | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Stats *stats=new Stats; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| stats->mode=new Array; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| stats->mode->size=0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| int nModes=0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| stats->mode->data=new int[nModes]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| stats->modFreq=1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| stats->median=0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return stats; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| I have also supplied the expected outputs you can compare against in a | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| StatResults.txt file. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
