﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Matrix
{
    class MatrixTest
    {
        static void Main()
        {
            Matrix<int> sample=new Matrix<int>(3,4);
            Matrix<int> sample2 = new Matrix<int>(4, 3);
            for (int i = 0; i < sample.Col; i++)
            {
                for (int j = 0; j < sample.Row; j++)
                {
                    sample[i, j]=i*(int)sample.Row + j;
                    sample2[j, i] = i * (int)sample.Row + j;
                }
            }
            Console.WriteLine("Coll {0} \n Roll{1}",sample.Col,sample.Row);
            for (int i = 0; i < sample.Col; i++)
            {
                for (int j = 0; j < sample.Row; j++)
                {
                    Console.Write(" {0}", sample[i, j]); 
                }
                Console.WriteLine();
            }
            sample = sample2 * sample;
            Console.WriteLine("Coll {0} \n Roll{1}", sample.Col, sample.Row);
            for (int i = 0; i < sample.Col; i++)
            {
                for (int j = 0; j < sample.Row; j++)
                {
                    Console.Write(" {0}", sample[i, j]);
                }
                Console.WriteLine();
            }
            sample += sample;
            Console.WriteLine("Coll {0} \n Roll{1}", sample.Col, sample.Row);
            for (int i = 0; i < sample.Col; i++)
            {
                for (int j = 0; j < sample.Row; j++)
                {
                    Console.Write(" {0}", sample[i, j]);
                }
                Console.WriteLine();
            }
        }
    }
}
