Home > database >  How can I input the data
How can I input the data

Time:05-14

Int [and] arr=new int [5, 5];
Console. WriteLine (" to the input element in the array: ");
for (int i=0; i <5; I++)
For (int j=0; J & lt; 5; J++)
Arr (I, j]=int. Parse (the Console. The ReadLine ());
Console. WriteLine (" main diagonal elements of the value in the order: ");
for (int i=0; i <5; I++)
{
Int j=I;
The Console. Write ({0} "\ t", arr [I, j]);
}
Console. WriteLine ();
Console. WriteLine (" secondary diagonal elements of the value in the order: ");
for (int i=0; i <5; I++)
{
Int j=4 - I;
The Console. Write ({0} "\ t", arr [I, j]);
  • Related