黑棵
我今天给你拿来拉呀,你看看怎么样,
using System;
class project
{
static void Main()
{
int[,] A = new int[2,3];
int[,] B= new int[2,3];
int[,] sum =new int[2,3];
System.Random r=new System.Random();
for(int i=0;i<2;i++)
{
for(int j=0;j<3;j++)
{A[i,j]=r.Next(100);
Console.Write(A[i,j] +" \t");
}
Console.WriteLine("\n");
}
for(int i=0;i<2;i++)
{
for(int j=0;j<3;j++)
{
B[i,j] =r.Next(100);
Console.Write(B[i,j] +" \t");
}Console.WriteLine("\n");
}
for(int i=0;i<2;i++)
{
for(int j=0;j<3;j++)
{
sum[i,j] =A[i,j] +B[i,j];
Console.Write(sum[i,j]+" \t" );
}
Console.WriteLine("\n");
}
Console.ReadLine();
}
}