Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

write a menu-driven mini-statics package. A user should be able to enter up to 2

ID: 3626383 • Letter: W

Question

write a menu-driven mini-statics package. A user should be able to enter up to 200 items of float data. The program should calculate the number of items in the data, the mean, the standard deviation, the variance. the median and the mode of the data. A sample run follows. the symbol <EOF> in the sample run below should be replaced with CTRL-Z or CTRL-D or the end of file symbol on your system.

Mini-Stat Package
----------------------------------
This program will perform the following:
1.) Enter Data.
2.) Display the data and the following statistics:
the number of data items, the high and low values in the data, the mean, median, mode, variance and standard deviation.
3.) Quit the program.

Explanation / Answer

#include #include #include //setting up of prototypes void readData(float[],int&); float mean(float[],int); float sd(float[],int); float min(float[],int); float max(float[],int); float median(float[],int); //main function main() { //declaring variables to store numbers, and user coice etc.., float data[200]; int choice,count=0,i; //prompting user to enter choice do { printf(" This program will perform the following:"); printf(" 1.Enter Data 2.Display the data and the following statistics: "); printf("the number of date item, the high and low values in the data, the mean, median, mode, variance and standard deviation."); printf(" 3.Quit the program "); printf(" Your Choice?"); scanf("%d",&choice); printf(" Enter one data item after each prompt. Press return after each one. Enter -1 with when you are done with data input. "); //based on the choice select an appropriate case switch(choice) { case 1: //calling readData function readData(data,count); break; case 2: //display statastice for(i=0;i