Advertisement
vvsvvs

Untitled

May 20th, 2022
876
132 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. static int Sum3X3(int[,]arr, int row, int col)
  2.         {
  3.             int result = 0;
  4.  
  5.             for (int r = row; r < row + 3; r++)
  6.             {
  7.                 for (int c = col; c < col + 3; c++)
  8.                 {
  9.                     result += arr[r, c];
  10.                 }
  11.             }
  12.  
  13.             return result;
  14.         }// int Sum3X3(arr, row, col)
Advertisement
RAW Paste Data Copied
Advertisement