Created
January 18, 2018 10:05
-
-
Save keehyun2/c496f5843f6541833d521acad22e75a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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