using System;
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter the Number of Rows");
int rowSize = int.Parse(Console.ReadLine());
Console.WriteLine("Enter the Column size");
int colSize = int.Parse(Console.ReadLine());
object[,] employeeData = new object[rowSize, colSize];
for (int i = employeeData.GetLowerBound(0); i <= employeeData.GetUpperBound(0); i++)
{
for (int j = employeeData.GetLowerBound(1); j <= employeeData.GetUpperBound(1); j++)
{
Console.WriteLine("Enter the Employee Data [{0} {1}]",i,j);
employeeData[i, j] = Console.ReadLine();
}
}
Console.WriteLine("Displaying the Employee Data");
for (int i = employeeData.GetLowerBound(0); i <= employeeData.GetUpperBound(0); i++)
{
for (int j = employeeData.GetLowerBound(1); j <= employeeData.GetUpperBound(1); j++)
{
Console.Write(employeeData[i, j]+"\t");
}
Console.WriteLine("\n");
}
}
}
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter the Number of Rows");
int rowSize = int.Parse(Console.ReadLine());
Console.WriteLine("Enter the Column size");
int colSize = int.Parse(Console.ReadLine());
object[,] employeeData = new object[rowSize, colSize];
for (int i = employeeData.GetLowerBound(0); i <= employeeData.GetUpperBound(0); i++)
{
for (int j = employeeData.GetLowerBound(1); j <= employeeData.GetUpperBound(1); j++)
{
Console.WriteLine("Enter the Employee Data [{0} {1}]",i,j);
employeeData[i, j] = Console.ReadLine();
}
}
Console.WriteLine("Displaying the Employee Data");
for (int i = employeeData.GetLowerBound(0); i <= employeeData.GetUpperBound(0); i++)
{
for (int j = employeeData.GetLowerBound(1); j <= employeeData.GetUpperBound(1); j++)
{
Console.Write(employeeData[i, j]+"\t");
}
Console.WriteLine("\n");
}
}
}
No comments:
Post a Comment