Advertisement
Guest User

Untitled

a guest
Oct 18th, 2010
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.58 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApplication1
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int size = 8;
  10.             int[,] arr = new int[size, size];
  11.  
  12.             for (int k = 0; k < size; k++)
  13.             {
  14.                 bool match = true;
  15.                 for (int i = 0; i < size && match; i++)
  16.                 {
  17.                     if (arr[k, i] != arr[i, k])
  18.                         match = false;
  19.                 }
  20.                 if (match)
  21.                     Console.WriteLine(k);
  22.             }
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement