using System;
class program
{
static void Main()
{
int[] lowerBound = { 2015, 10 };
int[] length = { 3, 3 };
int[,] testArray=(int[,])Array.CreateInstance(typeof(int),length,lowerBound);
for (int i = testArray.GetLowerBound(0); i <= testArray.GetUpperBound(0); i++)
{
for (int j = testArray.GetLowerBound(1); j <= testArray.GetUpperBound(1); j++)
{
Console.WriteLine("Enter the Data [{0} {1}]",i,j);
testArray[i, j] = int.Parse(Console.ReadLine());
}
}
for (int i = testArray.GetLowerBound(0); i <= testArray.GetUpperBound(0); i++)
{
for (int j = testArray.GetLowerBound(1); j <= testArray.GetUpperBound(1); j++)
{
Console.Write("{0:C}" + "\t", testArray[i, j]);
}
Console.WriteLine("\n");
}
}
}
class program
{
static void Main()
{
int[] lowerBound = { 2015, 10 };
int[] length = { 3, 3 };
int[,] testArray=(int[,])Array.CreateInstance(typeof(int),length,lowerBound);
for (int i = testArray.GetLowerBound(0); i <= testArray.GetUpperBound(0); i++)
{
for (int j = testArray.GetLowerBound(1); j <= testArray.GetUpperBound(1); j++)
{
Console.WriteLine("Enter the Data [{0} {1}]",i,j);
testArray[i, j] = int.Parse(Console.ReadLine());
}
}
for (int i = testArray.GetLowerBound(0); i <= testArray.GetUpperBound(0); i++)
{
for (int j = testArray.GetLowerBound(1); j <= testArray.GetUpperBound(1); j++)
{
Console.Write("{0:C}" + "\t", testArray[i, j]);
}
Console.WriteLine("\n");
}
}
}
No comments:
Post a Comment