using System;
class Test
{
static void PrintArr(int ArrLength)
{
int[] arr=new [2];
for(int i=0;i
a[i]=i;
Console.WriteLine("Print value");
for(i=0;i Console.WriteLine("a[{0}]={1}",i,a[i]);
}
static void Main()
{
int i=1;
while(i>0)
{
Console.WriteLine("Please Enter Length");
i=Int32.Parse(Console.ReadLine());
PrintArr(i);
}
}
}
这个是程序,谢谢大家帮下忙
static void Main(string[] args)
{
int i=1;
while (i > 0)
{
Console.WriteLine("Please Enter Length");
i = Int32.Parse(Console.ReadLine());
PrintArr(i);
}
}
static void PrintArr(int ArrLength)
{
int[] arr = new int[ArrLength];
for(int i=0;i
arr[i]=i;
Console.WriteLine("Print value");
for(int i=0;i
Console.WriteLine("a[{0}]={1}",i,arr[i]);
}
LZ你应该配个镜子了