```
#include <stdio.h>
#include <stdlib.h>
#define MAX 25
int readTotalNums();
void fillArray (int nums[], int total);
void sortIt (int nums[], int total);
int findMean (int nums[], int total);
int findMedian (int nums[], int total);
int findMode (int nums[], int total);
void printResults (mean, median, mode);
int goAgain ();

int main()
{
int nums[MAX];
int total;
double mean, median, mode;

do
{
    total=readTotalNums();
    fillArray(total,nums);
    sortIt(nums, total);
    mean= findMean (nums,total);
    mode=findMode(nums,total);
    median=findMedian(nums, total);
    printResults(mean,mode, median);
}while(goAgain());
return 0;
}

int readTotalNums()
{
int total;
do
{
    printf("How many numbers would you like to enter? (1-25)\n");
    scanf("%i",&total);
    while(getchar()!='\n');

}while (total<1 || total>MAX);
return total;
}

void fillArray (int nums[], int total)
{
int x;
for (x=0; x<total; x++)
    {
        printf("enter your numbers\n");
        scanf("%i", &nums[x]);
    while(getchar()!='\n');
    }
}

```

So I decided to just put up what I have already... because maybe the problem comes before my fillArray function...
I keep getting a "This program has stopped working" message, which, I know you usually get if you don't strip your carriage return. I'm very much a newbie, just trying to make it though my only programming class I have to take for my major, so any help would be appreciated!!