Skip to content

Instantly share code, notes, and snippets.

@keehyun2
Last active January 18, 2018 10:04
Show Gist options
  • Save keehyun2/382522ec7c1978db4c4216ae68f990e2 to your computer and use it in GitHub Desktop.
Save keehyun2/382522ec7c1978db4c4216ae68f990e2 to your computer and use it in GitHub Desktop.
#define _CRT_SECURE_NO_WARNINGS // scanf 보안 경고로 인한 컴파일 에러 방지
#include <stdio.h>
int main()
{
int N = 0;
scanf("%d", &N); // 1이상 100이하의 값을 입력
for (int i = 0; i < N; i++)
{
for (int j = 0; j < N; j++)
{
if (i > j)
{
printf(" ");
}
else
{
printf("*");
}
}
printf("\n");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment