write a menu driven mini statistics package. A user should be able to enter up t
ID: 3655545 • Letter: W
Question
write a menu driven mini statistics 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. The sample run follows. The symbol 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 wll perform the following: 1)Enter data. 2)Display the data and the folleing 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. ------------------------------------------------- Your choice? 1 Enter one data item after each prompt. press return after each one. signal with when you are done with data input. Item #1 : 25 Item #2 : 36 Item #3 : 27.5 Item #4: 28 Item #5: 32 Item #6: 33.25 Item#7: This program wll 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. ------------------------------------------------- your choice ? 2 here program will perform all stuff which is described in step 2; like the number of data items, the high and low values in the data, the mean, median, mode, variance and standard deviation. ---------------------------- Your choice ? 3 Thank you and goodbye!Explanation / Answer
#include #include #include #include void readData(double data[],int &count); double mean(double[],int); double sd(double[],int); double max(double,int); double min(double[],int); double median(double[],int); main() { double data[200]; int choice,count=0,i; 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. "); switch(choice) { case 1: readData(data,count); break; case 2: for(i=0;iRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.