C#的一个题求解,请高手帮忙!
usingSystem;publicclasstest{staticvoidMain(){int[]arr1=newint[2];int[]arr2=newint[]{1...
using System;
public class test{
static void Main() {
int[] arr1=new int[2];
int[] arr2=new int[]{1,2,3};
string[] arr3={"six"," is ","me"};
int[,] arr4={{1,2},{3,4}};
int[,] arr5=new int[3,4];
for(int i=0;i<arr1.Length;i++) {
arr1[i]=i*i*i;
Console.WriteLine("arr1[{0}]={1}",i,arr1[i]);
}
for (int i=0;i<4;i++) {
for(int j=0;j<3;j++) {
arr5[j,i]=i*j;
Console.WriteLine("arr5[{0},{1}]={2}",j,i,arr5[j,i]); }
}
}
}
求这个程序的运行结果!谢谢帮忙啊!!! 展开
public class test{
static void Main() {
int[] arr1=new int[2];
int[] arr2=new int[]{1,2,3};
string[] arr3={"six"," is ","me"};
int[,] arr4={{1,2},{3,4}};
int[,] arr5=new int[3,4];
for(int i=0;i<arr1.Length;i++) {
arr1[i]=i*i*i;
Console.WriteLine("arr1[{0}]={1}",i,arr1[i]);
}
for (int i=0;i<4;i++) {
for(int j=0;j<3;j++) {
arr5[j,i]=i*j;
Console.WriteLine("arr5[{0},{1}]={2}",j,i,arr5[j,i]); }
}
}
}
求这个程序的运行结果!谢谢帮忙啊!!! 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询