728x90
import java.io.*;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int x = Integer.parseInt(br.readLine());
// 단수만큼 \n
for (int i = 1; i <= x; i++) {
// 단수만큼 *
for (int j = i; j > 0; j--) {
System.out.print("*");
}
System.out.println();
}
}
}
728x90
'✍ Baekjoon' 카테고리의 다른 글
[백준/JAVA] (CLASS1) 2557번 Hello World (0) | 2022.06.06 |
---|---|
[백준/JAVA] (CLASS1) 2475번 검증수 (0) | 2022.06.06 |
[백준/JAVA] (CLASS1) 1330번 두 수 비교하기 (0) | 2022.06.06 |
[백준/JAVA] (CLASS1) 1008번 A/B (0) | 2022.06.06 |
[백준/JAVA] (CLASS1) 1001번 A-B (0) | 2022.06.06 |