Click here to Skip to main content
14,734,298 members

Comments by Member 9901458 (Top 2 by date)

Member 9901458 22-Apr-13 5:26am View
   
int number = 5;

for (int i = 0; i < number;i++)
{
if (i == 0 || i == 4)
{
for (int j = 0; j < number; j++)
{
Console.Write("*");
}
Console.WriteLine();
}
if (i >= 1 && i <= 3)
{
for (int j = 0; j < number; j++)
{
if (j == 0 || j == 4)
{
Console.Write("*");
}
else if (j >= 1 && j <= 3)
{
Console.Write(" ");
}
}
Console.WriteLine();
}
}
Member 9901458 22-Apr-13 2:44am View
   
*****
* *
* *
* *
*****

Progarm for this?