public static void Main()
Console.WriteLine("Hello World");
Console.WriteLine("Enter rows in array: ");
int rows = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter Cols in array: ");
int cols = Convert.ToInt32(Console.ReadLine());
string[,] ar1 = TakeIn(rows, cols);
ReadOut(ar1, rows, cols);
public static string[,] TakeIn(int r, int c){
string[,] ar = new string[r,c];
for(int i = 0; i<r; i++){
ar[i,j] = Console.ReadLine();
public static void ReadOut(string[,] n,int r,int c){
for(int i = 0; i<r; i++){
for(int j = 0; j<c; j++){
Console.Write(n[i,j]+" ");