Skip to content

Instantly share code, notes, and snippets.

@henrikh
Created August 23, 2009 08:54
Show Gist options
  • Save henrikh/173205 to your computer and use it in GitHub Desktop.
Save henrikh/173205 to your computer and use it in GitHub Desktop.
int Average(int i)
{
static int sum = 0, count = 0;
sum = sum + i;
count++;
return sum / count;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment