You need to initialized sum to zero.
Turn on compiler warnings -- they tell you about that sort of thing. In Dev-C++, choose Compiler Options and in the "Pass these parameters to the compiler" add -W -Wall.
[edit] BTW, the minimum and maximum values an int can hold are in <limits.h>.
Code:
#include <limits.h>
int min = INT_MAX;
int max = INT_MIN;
[/edit]
[edit=2] You don't really need avg. You could do this (I wrapped the long lines):
Code:
avg = sum / counter;
printf("Your average is: %f \n Your maximum is: %d \n\
Your minumum is: %d \n", avg, max, min);
->
Code:
printf("Your average is: %f \n"
"Your maximum is: %d \n"
"Your minumum is: %d \n", sum / counter, max, min);
That code is valid BTW. You can use it in your program.
The preprocessor concatenates adjacent string literals. (Whew.) So if you use
Code:
printf("hi" " there");
it's the same as
Code:
printf("hi there");
[/edit]