반응형
<코드>
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 <= i; j++) {
System.out.print("*");
}
System.out.print("\n");
}
}
}
반응형
'🧩PS > 🥉Easy' 카테고리의 다른 글
[JAVA] 백준 10871번 - X보다 작은 수 (0) | 2021.09.17 |
---|---|
[JAVA] 백준 2439번 - 별 찍기 - 2 (0) | 2021.09.17 |
[JAVA] 백준 11022번 - A+B - 8 (0) | 2021.09.17 |
[JAVA] 백준 11021번 - A+B - 7 (0) | 2021.09.17 |
[JAVA] 백준 2742번 - 기찍 N (0) | 2021.09.14 |