title: Average between neighbour positions
body: <p>I have a square matrix and I need to do the average between the neighbours of each matrix position which has all their neighbours inside the matrix itself.</p>
  
  <p>Explaining with an example, if I have a matrix like that:</p>
  
  <pre><code>10 11  1  4
   5  1  6  9
   9  0  2  7
   7  4  9  8
  </code></pre>
  
  <p>The average will be calculated only in the positions (2,2), (2,3), (3,2) and (3,3).</p>
  
  <p>After those operations, the final matrix will be this listed bellow:</p>
  
  <pre><code>5.00  4.56
  4.78  5.11
  </code></pre>
  
  <p>Sorry for my confused explanations, I'm a beginner at C language and I'm having a lot of difficulties to do this algorithm.</p>
  
  <p>I will be grateful for everyone who can explain that to me and show me a solution.</p>