using C

Community Answer

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