I have written this code to read a file with the uses of arrays input implement the data and print the data as follows. I have no compile errors, i just have troubles reading and printing the file, i dunno if its my fscanf or print details. someone please help. its really ........ing me off.

the .txt file is:

2009_wbb_stats.txt

01-08 80-76 2190
01-11 81-65 6090
01-18 70-61 2107
01-22 84-66 4326
01-25 82-68 12067
01-29 58-67 4119
02-01 66-55 6887
02-05 72-65 3266
02-08 81-54 3696
02-12 81-69 3216
02-15 63-58 2478
02-19 70-73 5295
02-22 65-59 7006
03-01 94-57 5616


Code:
#include <stdio.h>
#include <math.h>
#define FILENAME "2009_wbb_stats.txt"
#define G 20

  int readStats (int month[], int day[], int auburn[], int opp[], int attendance[]);
    
  void printReport (int month[], int day[], int auburn[], int opp[], int game, int attendance[]);
    
  int printDetails (int month[], int day[], int auburn[], int opp[], int game, int attendance[]);
    
  void printTop ();
    
  void printSummary ( int auburn[], int opp[], int game, int win);
    
  double mean (int attendance[], int game);
  int maxi (int attendance[], int game);
  int mini (int attendance[], int game);
    
    
   int main (void)
  {
     int month[G], day[G], auburn[G], opp[G], attendance[G];
     int game;
   
     game = readStats( month, day, auburn, opp, attendance);
   
     printReport( month, day, auburn, opp, game, attendance);
   
  }
    
    //reads data from text file
    
   int readStats (int month[], int day[], int auburn[], int opp[], int attendance[])
  {
     int x=0;
     char dash;
     FILE *inFile;
   
     inFile = fopen(FILENAME, "r");
   
     if(inFile == NULL)
        printf ("Error opening file.");
       
     else
     { 
        while( fscanf(inFile,"%d%c%d %d%c%d %d", &month[x], &dash, &day[x], &auburn[x], &dash, &opp[x], &attendance[x]) != EOF) x++;
     
     }
     return x;
       
  }
  
   double mean (int attendance[], int game)
  {
     int h;
     double sum=0;
   
     for (h=0; h<attendance[h]; h++)
     {
        sum += attendance[h];
     }
   
     return sum/h;
  }
  
   int printDetails (int month[], int day[], int auburn[], int opp[], int game, int attendance[])
  {
     int var, max1, min1, b, n;
     char num1, num2;
     n = mean(attendance, game);
     max1 = max( attendance, game);
     min1 = min( attendance, game);
     double win = 0;
     char Win[G];
   
     if (auburn [b]> opp[b])
     {
        Win[b] = 'W';
        win++;
     }
     
     else if (auburn[b] < opp[b])
        Win[b] = 'L';
       
     for (b=0; b<game; b++)
     {
        printf("%d/%d %d/%d %c %d", month[b], day[b], auburn[b], opp[b], Win[b], attendance[b]);
     }
   
     if (attendance[b]>n)
        printf("*");
     if (attendance[b]==max1)
        printf("+");
     if (attendance[b]==min1)
        printf("-");
       
     printSummary( auburn, opp, game, win);
   
     return var;
   
  }
  
   void printReport( int month[], int day[], int auburn[], int opp[], int game, int attendance[])
  
  {
     printTop();
     printf("this program is wild");
     printDetails( month, day, auburn, opp, game, attendance);
   
  }
    
   void printSummary( int auburn[], int opp[], int game, int win)
  {
     int b;
   
     printf("\nAuburn has won %d of its %d games.", win, game);
     printf("\nAuburn's average score is %d.", auburn[b]);
     printf("\nThe opponents' average score is %d", opp[b]);
     printf("\n*attendance is above average");
     printf("\n+high attendance");
     printf("\n-low attendance");
   
  }
  
   int max( int attendance[], int game)
  {
     int b;
     int max;
   
     for (b=0; b<game; b++)
     {
        if (attendance[b] > max)
           max = attendance[b];
       
     }
   
     return max;
  }
  
   int min( int attendance[], int game)
  {
     int b;
     int min;
   
     for(b=0; b<game-1; b++)
     {
        if (attendance[b] < min)
           min = attendance[b];
     
     }
   
     return min;
  
  }
    
   void printTop()
  {
     printf("Date  Score     Result  W/L  Attendance\n");
     printf("---------------------------------------\n");
   
  }