using System;
public class Test
{
public static void Main()
{
var number = Console.ReadLine();
int n = Convert.ToInt32(number);
int dummy = 0;
for(int i=0;i<n;i++)
{
if(i>0)
{
dummy = i ;
}
for(int j=0;j<n;j++)
{
if(j<dummy )
{
Console.Write(" ");
}
else
{
Console.Write("* ");
}
}
Console.WriteLine();
}
}
}
stdout
public class Test
{
public static void Main()
{
var number = Console.ReadLine();
int n = Convert.ToInt32(number);
int dummy = 0;
for(int i=0;i<n;i++)
{
if(i>0)
{
dummy = i ;
}
for(int j=0;j<n;j++)
{
if(j<dummy )
{
Console.Write(" ");
}
else
{
Console.Write("* ");
}
}
Console.WriteLine();
}
}
}
stdout
Please Enter n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Comments
Post a Comment