help with "shrinking" array

i need help writing a program for a "shrinking array". i have no idea where to start and urgently need to know this for a class...

the question is something like this.

if you have a large array say:

**0 1 2** 4 5 7 5 4 2 1 0

**1 2 3** 5 6 8 6 5 3 2 1

**2 3 4** 6 7 9 7 6 4 3 2

4 5 6 8 9 11 9 7 6 5

etc (more numbers)

you want it to be "shrunken" into a array like this:

**2** 4 6 4 2

4 7 9 7 4

6 9 11 9 6

4 7 9 7 4

2 4 6 4 2

where the numbers in the shrunken array are the averages of a 3x3 from the large matrix. Ie the 2 in the top corner of the shruken array is found by:

(0+1+2+1+2+3+2+3+4)/9. this similar work is done for the numbers found in the shrunken array.

the question asks to write a function that has a symbolic constant SIZE that represents the number of rows and columns in the larger array. and that SIZE will always be odd and greater than or equal to 3. This function must work for any original image of dimensions SIZE by SIZE and must accept the larger source array and the smaller target array as arguements.

it also says not to use any printf(" or scanf(" statements.

thanks for your help guys, any is appreciate... i am desperate in searching for a solution for this (even though i have no idea where to start).