using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
namespace OverloadingConstructor
{
class Program
{
static void Main(string[] args)
{
string[,] array = new string[5, 11];
for (int i = 0; i <= 4; i++)
{
for (int j = 0; j <= 10; j++)
{
array[i, j] = "*";
}
Console.WriteLine();
}
for (int k = 0; k <= 4; k++)
{
for (int l = (k+1); l <=(10-(k+1)); l++)
{
array[k, l] = " ";
}
}
for (int i = 0; i <= 4; i++)
{
for (int j = 0; j <= 10; j++)
{
Console.Write(array[i, j]);
}
Console.WriteLine();
}
Console.ReadLine();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
namespace OverloadingConstructor
{
class Program
{
static void Main(string[] args)
{
string[,] array = new string[5, 11];
for (int i = 0; i <= 4; i++)
{
for (int j = 0; j <= 10; j++)
{
array[i, j] = "*";
}
Console.WriteLine();
}
for (int k = 0; k <= 4; k++)
{
for (int l = (k+1); l <=(10-(k+1)); l++)
{
array[k, l] = " ";
}
}
for (int i = 0; i <= 4; i++)
{
for (int j = 0; j <= 10; j++)
{
Console.Write(array[i, j]);
}
Console.WriteLine();
}
Console.ReadLine();
}
}
}
No comments:
Post a Comment