using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            // 2*3 boyutundaki iki marisin toplanması ve sonuç matrisin ekrana yazdırılması 
            int[,] A = { { 10, 20, 5 }, { 23, 5, 8 } };
            int[,] B = { { 11, 2, 5 }, { 3, 15, 18 } };
            int[,] C = new int[2,3];
            
            for (int i = 0; i < 2; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    C[i, j] = A[i, j] + B[i, j];
                    Console.Write("{0} ", C[i, j]);
                }
                    Console.WriteLine();
            }
        }
    }
}
Hiç yorum yok:
Yorum Gönder