import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for (int i=1; i <= n; i++) {
for (int j=1; j <= n - i; j++) {
System.out.print(" ");
}
for (int k=0; k < i ; k++) {
System.out.print("*");
}
System.out.println();
}
}
}
'백준알고리즘 > Bronze IV' 카테고리의 다른 글
2530번: 인공지능 시계 (0) | 2022.06.30 |
---|---|
2480번: 주사위 세개 (0) | 2022.06.30 |
2440번: 별 찍기 -3 (0) | 2022.06.30 |
1264번: 모음의 개수 (0) | 2022.06.28 |