2D Array using C#.Net
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace _2D_Array
{
class Program
{
static void Main(string[] args)
{
int[,] a = new int[3,3];
int i, j;
for (i = 0; i <= 2; i++)
{
for (j = 0; j <= 2; j++)
{
Console.WriteLine("enter the value");
a[i, j] = Convert.ToInt32(Console.ReadLine());
}
}
for (i = 0; i <= 2; i++)
{
for (j = 0; j <= 2; j++)
{
Console.WriteLine(a[i, j]);
}
Console.WriteLine();
}
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace _2D_Array
{
class Program
{
static void Main(string[] args)
{
int[,] a = new int[3,3];
int i, j;
for (i = 0; i <= 2; i++)
{
for (j = 0; j <= 2; j++)
{
Console.WriteLine("enter the value");
a[i, j] = Convert.ToInt32(Console.ReadLine());
}
}
for (i = 0; i <= 2; i++)
{
for (j = 0; j <= 2; j++)
{
Console.WriteLine(a[i, j]);
}
Console.WriteLine();
}
}
}
}
OutPut : To Run The Program to see the OutPut
Sign up here with your email
ConversionConversion EmoticonEmoticon