using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; // omae wa... // mou shindeiru! namespace Matrixos { class Matrix { private int cnt; private int[,] arr; public Matrix() { do { Console.WriteLine("Hanyszor hanyas matrix ko? -> "); cnt = int.Parse(Console.ReadLine()); } while (cnt<1); // fültöltés for (int i = 0; i < cnt; i++) { for (int j = 0; j < cnt; j++) { if (i == j) { arr[i, j] = 1; } else if (i > j) { arr[i, j] = 3; } else { arr[i, j] = 2; } } } } void Kiir() { for (int i = 0; i < cnt; i++) { for (int j = 0; j < cnt; j++) { Console.Write("{0},3", arr[i,j]); } Console.WriteLine(); } } } }