Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- int[,] a = new int[,] {
- {1,1,1,0,0,0},
- {0,1,0,0,0,0},
- {1,1,1,0,0,0},
- {0,0,2,4,4,0},
- {0,0,0,2,0,0},
- {0,0,1,2,4,0}
- };
- int col = 0; int ind = 0; int currHighest = 0;
- while (col < 4)
- {
- currHighest = a[col, ind] + a[col, ind+1] + a[col,ind+2] + a[col+1,ind+1] + a[col+2,ind] + a[col+2,ind+1] + a[col+2,ind+2];
- ind++;
- Console.WriteLine(currHighest);
- if (ind == 4)
- {
- ind = 0; col++;
- }
- }
- Console.ReadLine();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement