Skip to content

Instantly share code, notes, and snippets.

@keehyun2
Created January 18, 2018 10:05
Show Gist options
  • Save keehyun2/c496f5843f6541833d521acad22e75a6 to your computer and use it in GitHub Desktop.
Save keehyun2/c496f5843f6541833d521acad22e75a6 to your computer and use it in GitHub Desktop.
using System;
using System.Text;
namespace C_sharp
{
class Program
{
static void Main(string[] args)
{
int N = int.Parse(Console.ReadLine());
StringBuilder sb = new StringBuilder();
for (int i = 0; i < N; i++)
{
for (int j = 0; j < N; j++)
{
if (i > j)
{
sb.Append(" ");
}
else
{
sb.Append("*");
}
}
sb.Append("\n");
}
Console.WriteLine(sb);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment