I still cannot get this to work. If the user enters a alphabet character and presses enter it says the user pressed the enter key, but if they just press enter it doesn't do anything but wait for the next floating point number.

Here is my code, did i forget anything?:

Code:

#include <stdio.h>
#define size 3
void main(void)
{
float num[size];
int i;
float min;
float max;
float avg;
float sumofnum;
printf("Enter 10 floating point numbers: \n");
for (i = 0; i < size; i++)
{
scanf("%f", &num[i]);
}
/*Check if character is entered*/
if(getchar() =='\n')
{
/*Minimum Number*/
min = num[0];
for (i = 0; i < size; i++)
{
if(num[i] < min)
{
min = num[i];
}
}
/*Maximum Number*/
max = num[0];
for (i = 0; i < size; i++)
{
if(num[i] > max)
{
max = num[i];
}
}
/*Average of Numbers*/
for (i = 0; i < size; i++)
{
sumofnum += num[i];
}
avg = sumofnum / size;
printf("The minimum number you have entered is: %.2f\n", min);
printf("The maximum number you have entered is: %.2f\n", max);
printf("The average of the numbers you entered is: %.2f\n", avg);
}
else
printf("You pressed enter\n");
return;
}

Thanks