1 1 1 1 1
2 2 2 2 2
3 3 3 3 3
4 4 4 4 4
5 5 5 5 5
using arrays in c#???
This post has been edited by PsychoCoder: 31 March 2010 - 08:57 AM
Reason for edit:: Title edited to be more descriptive




Posted 31 March 2010 - 07:19 AM
This post has been edited by PsychoCoder: 31 March 2010 - 08:57 AM
Reason for edit:: Title edited to be more descriptive
Posted 10 April 2010 - 08:37 AM
using System;
using System.Collections.Generic;
using System.Text;
namespace Practice
{
class Class2
{
public static void Main(string[] args)
{
int[,] arr = new int [5,5];
int i,j,k;
k=1;
for(i=0;i<5;i++)
{
for (j = 0; j < 5; j++)
{
arr[i,j] = k;
}
++k;
}
Console.WriteLine("Reduired Matrix Format");
for (i = 0; i < 5; i++)
{
for (j = 0; j < 5; j++)
{
Console.Write(" " + arr[i, j]);
}
Console.WriteLine();
}
Console.ReadLine();
}
}
}
Posted 10 April 2010 - 08:42 AM
|
|
Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused).
|
