Esempio n. 1
0
        static void Main(string[] args)
        {
            var arr     = DocFile("arr4.txt");
            var tongMax = new TongMax(arr);

            tongMax.XuatArr();
            var diem = new Diem(0, 0);

            tongMax.TimTheoDuongThang(diem);

            var sss = tongMax.DuongDiDaiNhatTrongMang();

            GhiFile("a.txt", sss);
            Console.WriteLine();
            Console.ReadKey();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var arr = new int[5, 5] {
                { 0, 0, 0, 0, 1 }, { 0, 1, 0, 1, 0 }, { 0, 0, 1, 0, 1 }, { 0, 1, 0, 1, 1 }, { 0, 0, 1, 1, 0 }
            };
            var s    = new TongMax(arr);
            var diem = new Diem(4, 2);

            //  s.XuatArr();
            s.TimTheoDuongThang(diem);

            var sssssssss = s.CacDuongDiTrongMang();

            s.XuatArr();
            Console.ReadKey();
        }