ASsignment::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. A sample run follows. The symbol <EOF> in the sample run below should be replaced with CTRL-Z or CTRL-D

I have no problems with the actual display but the output of the variables.
I can't seem to get any of the variables to come out correct as they always have 0.00 or "#J"




Code:
#include  <stdio.h>
#include <stdlib.h>
#include <math.h>

void readData(float[],int count);
float mean(float[],int);
float sd(float[],int);
float min(float[],int);
float max(float[],int);
float median(float[],int);

main()
{
            
 float data[200];
int choice,count=0,i;
            
do
{
  printf("\nThis program will perform the following:");
   printf("\n1.Enter Data\n2.Display the data and the following statistics:\n");
    printf("the number of date item, the high and low values in the data, \n the mean, median, mode, variance and standard deviation.");
     printf("\n3.Quit the program\n");
        printf("\n\nYour Choice?");
    scanf("%d",&choice);
         printf("\nEnter one data item after each prompt. Press return after each one."); 
         printf("\nEnter -1 with  when you are done with data input.\n\n");
       
   switch(choice)
     {
     case 1:
          readData(data,count);
          break;
 
   case 2:
  
  printf("\nGiven data: \n");
            
    printf("%.2f ",data[i]);
    printf("\n\nTotal no of data items: %d",count);
    printf("\nHighest value in the data: %.2f",max(data,count));
    printf("\nLowest value in the data: %.2f",min(data,count));
    printf("\nMean: %.2f",mean(data,count));
    printf("\nMedian: %.2f",median(data,count));
    printf("\nStandard Deviation: %.2f",sd(data,count));
    printf("\nVariance: %.2f\n\n",pow((sd(data,count)),2));
    break;
     
   case 3:exit(0);
                                    }
 }while(1);
 
  
 getchar();
 return 0;
}


void readData(float data[],int count)
{
     float value;
     
      
     printf("Item #%d:\t",count+1);
      scanf("%f",&value);
                       
while((value) != EOF)
  {
   
    printf("Item #%d:\t",count+1);
      scanf("%f",&value);
      
  }
}

float mean(float *data,int count)
{
 int i;
  float mean=0.0;
   for(i=0;i<count;i++)
   mean+=data[i];
  return mean/count;
            }

float sd(float data[],int count)
{
  float avg=mean(data,count);
  float SD=0.0;
   int i;
   for(i=0;i<count;i++)
   {
     SD+= pow((data[i]-avg),2);
     }
    return sqrt(SD/count);
}

float max(float data[],int count)
 {
    int i=0;
    float max=data[0];
                       
    for(i=0;i<count;i++)
     if(max<data[i])
       max=data[i];
       
       
    return max;
            }

float min(float data[],int count)
{
    int i=1;
    float min=data[0];
   
    for(i =0;i<count;i++)
    
    if(min>data[i])
    min=data[i];
    return min;
            }
            
            
float median(float data[],int count)
{
    int i,j;
     float tmp;
   for(i=0;i<count-1;i++)
     for( j=i+1;j<count;j++)
        if(data[i]>data[j])
{
      tmp=data[i];
         data[i]=data[j];
         data[j]=tmp;
      }
       if(count%2==0)
         return (data[count/2-1]+data[count/2])/2;
       else
         return data[count/2];
             }