I don't know what compiler you're using. You could declare arrays with variable sizes, which wasn't legal in the older C89, so either you're in C99 or some older compiler with a very limited extension list. Anyway, I tried your code out on Comeau's online compiler, and got
Code:
Comeau C/C++ 4.3.10.1 (Oct 6 2008 11:28:09) for ONLINE_EVALUATION_BETA2
Copyright 1988-2008 Comeau Computing. All rights reserved.
MODE:strict errors C99
"ComeauTest.c", line 30: warning: variable "ageMoyenM" was declared but never
referenced
int ageMoyenM, ageMoyenF;
^
"ComeauTest.c", line 30: warning: variable "ageMoyenF" was declared but never
referenced
int ageMoyenM, ageMoyenF;
^
warnings for two variables you never used, but everything else worked out.
On the no-reason-for-it assumption you're using gcc, make sure you have -std=C99 somewhere on your compilation line.