John gave you the solution to the compilation problem.
Please note you have also a logical error:
Quote:
int result = (number1 + number2 + number3) % 3;
That's not compute the average of the three integers. You should write instead:
double avg = (number1 + number2 + number3) / 3.0;