Question using C Central Tendency Write an application that conducts the following in a looped manner: • Provides a menu that is looped for user selection checking for out of bounds entry . Allow the user to enter a dynamic number of integer based entries. Once the data has been supplied print it once to the screen. Any re-selection will over-write the existing data in memory. • Sort the data (L to H) and print it to the screen. • Calculate the max, min, range, mean, and median of the provided data. • Use functions, through the use of pointers, for the stats/data collection routines above • Limit statistical calculations to 1 decimal point in the displayed output • Lab Update - Please use only positive integers for the data entry. Sample: //red indicates user input Your name/number are hard coded in the text - not strings://welcome message is only once Welcome Student Name (Student Number) to the Central Tendency Tool. Available Operations: 1. Store Data and Compute Statistics 2. Exit //loop until exit selected Enter your selection: 1 //every time I is selected overwrite existing data and re calculate How many terms would you like to enter? 6 1/restricts number of entries but dynamic, require at least 2 items //update on as peeded based on user input Term 1:22 Term 2:13 Term 3: 14 Term 4:17 Term 5:22 Term 6:31 Provided data: 22, 13, 14, 17, 22, 31 Sorted data: 13, 14, 17, 22, 22, 31 //computed based on provided user dynamic data Statistical Results: Min: 13 Мах: : 31 Range: 18 Mean: Median: 19.8 19.5 1/limit all to 1 decimal point for printed solution Available Operations: 1. Store Data and Compute Statistics 2. Exit Enter your selection: 5 Sorry your input was not understood. Please try again. Available Operations: 1. Store Data and Compute Statistics 2. Exit //loop until exit selected Enter your selection: 2

T5OFPO The Asker · Computer Science
using C
Transcribed Image Text: Central Tendency Write an application that conducts the following in a looped manner: • Provides a menu that is looped for user selection checking for out of bounds entry . Allow the user to enter a dynamic number of integer based entries. Once the data has been supplied print it once to the screen. Any re-selection will over-write the existing data in memory. • Sort the data (L to H) and print it to the screen. • Calculate the max, min, range, mean, and median of the provided data. • Use functions, through the use of pointers, for the stats/data collection routines above • Limit statistical calculations to 1 decimal point in the displayed output • Lab Update - Please use only positive integers for the data entry. Sample: //red indicates user input Your name/number are hard coded in the text - not strings://welcome message is only once Welcome Student Name (Student Number) to the Central Tendency Tool. Available Operations: 1. Store Data and Compute Statistics 2. Exit //loop until exit selected Enter your selection: 1 //every time I is selected overwrite existing data and re calculate How many terms would you like to enter? 6 1/restricts number of entries but dynamic, require at least 2 items //update on as peeded based on user input Term 1:22 Term 2:13 Term 3: 14 Term 4:17 Term 5:22 Term 6:31 Provided data: 22, 13, 14, 17, 22, 31 Sorted data: 13, 14, 17, 22, 22, 31 //computed based on provided user dynamic data Statistical Results: Min: 13 Мах: : 31 Range: 18 Mean: Median: 19.8 19.5 1/limit all to 1 decimal point for printed solution Available Operations: 1. Store Data and Compute Statistics 2. Exit Enter your selection: 5 Sorry your input was not understood. Please try again. Available Operations: 1. Store Data and Compute Statistics 2. Exit //loop until exit selected Enter your selection: 2
More
Transcribed Image Text: Central Tendency Write an application that conducts the following in a looped manner: • Provides a menu that is looped for user selection checking for out of bounds entry . Allow the user to enter a dynamic number of integer based entries. Once the data has been supplied print it once to the screen. Any re-selection will over-write the existing data in memory. • Sort the data (L to H) and print it to the screen. • Calculate the max, min, range, mean, and median of the provided data. • Use functions, through the use of pointers, for the stats/data collection routines above • Limit statistical calculations to 1 decimal point in the displayed output • Lab Update - Please use only positive integers for the data entry. Sample: //red indicates user input Your name/number are hard coded in the text - not strings://welcome message is only once Welcome Student Name (Student Number) to the Central Tendency Tool. Available Operations: 1. Store Data and Compute Statistics 2. Exit //loop until exit selected Enter your selection: 1 //every time I is selected overwrite existing data and re calculate How many terms would you like to enter? 6 1/restricts number of entries but dynamic, require at least 2 items //update on as peeded based on user input Term 1:22 Term 2:13 Term 3: 14 Term 4:17 Term 5:22 Term 6:31 Provided data: 22, 13, 14, 17, 22, 31 Sorted data: 13, 14, 17, 22, 22, 31 //computed based on provided user dynamic data Statistical Results: Min: 13 Мах: : 31 Range: 18 Mean: Median: 19.8 19.5 1/limit all to 1 decimal point for printed solution Available Operations: 1. Store Data and Compute Statistics 2. Exit Enter your selection: 5 Sorry your input was not understood. Please try again. Available Operations: 1. Store Data and Compute Statistics 2. Exit //loop until exit selected Enter your selection: 2
Community Answer
HNHQ7T

Hi there,I have completed the solution as it is described.The Code :#include<stdio.h>#include<stdlib.h>//print the datavoid printData(int arr[],int n){   for(int i=0;i<n;i++)   {       if(i!=n-1)           printf("%d,",arr[i]);       else          printf("%d",arr[i]);     }}      //sort the datavoid sortData(int *arr,int n){   for(int i=0;i<n-1;i++)   {       for(int j=i+1;j<n;j++)       {          if(arr[j]<arr[i])           {              int temp=arr[i];              arr[i]=arr[j];              arr[j]=temp;           }       }   }}//return minint min(int arr[],int n){   return arr[0];}                        //return maxint max(int arr[],int n){   return arr[n-1];}//return rangeint range(int arr[],int n){   return arr[n-1]-arr[0];}//return meanfloat mean(int arr[],int n){   int sum=0;   for(int i=0;i<n;i++)   {       sum+=arr[i];   }     return sum/(n*1.0);}//return medianfloat median(int arr[],int n){   if(n%2==0)       return(arr[n/2]+arr[(n/2)-1])/2.0;   else       return arr[n/2]*1.0;         }int main(){   int choice;   printf("\nWelcome John Doe (1706654) to the CentralTendency Tool.");   do   {       printf("\n\nAvailableOperations:\n1. Store Data and Compute Statistics\n2. Exit\n\nEnteryour Selection: ");       scanf("%d",&choice);       switch(choice)       {           case 1:           {              int n;              ... See the full answer