Multpilcation of Matrix Using 2D Arrays
Multpilcation of Matrix Using 2D Arrays
using
using
using
using
System;
System.Collections.Generic;
System.Linq;
System.Text;
namespace ConsoleApplication78
{
class Program
{
static void Main(string[] args)
{
int i = 0;
int j = 0;
c[i, j] = 0;
int no_of_rows_a = 0;
int no_of_columns_a = 0;
int no_of_rows_b = 0;
int no_of_columns_b = 0;
Console.WriteLine(" Enter the number of rows for matrix A");
no_of_rows_a = Convert.ToInt32(Console.ReadLine());
no_of_columns_a = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(" Enter the number of rows for matrix B");
no_of_rows_b = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(" Enter the number of columns for matrix B");
no_of_columns_b = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(" The values of A matrix is :");
for (i = 0; i < no_of_rows_a; i++)
{
for (j = 0; j < no_of_columns_a; j++)
{
a[i,j]= Convert.ToInt32(Console.ReadLine());
}
}
Console.WriteLine(" The values of B matrix is :");
for (i = 0; i < no_of_rows_b; i++)
{
for (j = 0; j < no_of_columns_b; j++)
{
b[i, j] = Convert.ToInt32(Console.ReadLine());
}
}
}
}