2438 - 별 찍기 - 1알고리즘/백준2023. 8. 16. 22:20
Table of Contents
바깥쪽 for문은 행을 의미하고, 안쪽 for문은 열을 의미한다.
package boj;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class b2438 {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(br.readLine());
for(int i=1; i<=N; i++) {
for(int j=1; j<=i; j++) {
System.out.print("*");
}System.out.println();
}
}
}
728x90
'알고리즘 > 백준' 카테고리의 다른 글
10952 - A + B - 5 (0) | 2023.08.16 |
---|---|
2439 - 별 찍기 - 2 (0) | 2023.08.16 |
15552 - 빠른 A + B (0) | 2023.08.16 |
25314 - 코딩은 체육과목입니다. (0) | 2023.08.16 |
25304 - 영수증 (0) | 2023.08.16 |
@leegeonwoo :: geonwoo
포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!