Hi
im new to programming, and have been trying to create a small program that can find the mean of a set of numbers from an array, the problem i face is that when i run the program instead of the correct answer appearing, a random set of numbers appears usually something like -827427429 etc, does anyone know what i have done wrong, if it helps im using visual express c++ 2010
Code:
#include <stdio.h>
#define Size 11
int main(void)
{
int y;
int i;
int average = 0;
int sum = 0;
int mean[Size]={13, 36, 16, 21, 24, 16, 21, 10, 18, 16};
for (i=0; i<Size; i++);
{sum += mean[i];
average=sum/10;
printf("%d\n",average);}
scanf("%d",&y);
return 0;
}