
Untitled
By: a guest on
Apr 29th, 2012 | syntax:
C# | size: 0.83 KB | hits: 20 | expires: Never
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication69
{
class Program
{
static void Main(string[] args)
{
int[,] mat = new int[6,6];
bool equal = true;
int emzaS = mat.GetLength(0)/2;
int emzaT = mat.GetLength(1)/2;
for (int shura = 0; shura < emzaS; shura++)
for (int tur = 0; tur < emzaT; tur++)
if ((mat[shura, tur] != mat[emzaS + shura, tur]) || (mat[shura, tur] != mat[shura, emzaT + tur]) || (mat[shura, tur] != mat[emzaS + shura, emzaT + tur]))
equal = false;
if (equal)
Console.WriteLine("Equal");
else
Console.WriteLine("Not equal");
}
}
}