[백준/Java] 2438 : 별 찍기 - 1

SEOP·2024년 6월 6일
0
post-custom-banner

import java.io.*;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

        int input = Integer.parseInt(br.readLine());

        for (int i = 0 ; i < input ; i++){
            for (int j = 0 ; j <= i ; j++){
                bw.write("*");
            }
            bw.newLine();
        }

        bw.flush();
        bw.close();
    }
}
profile
응애 나 애기 개발자
post-custom-banner

0개의 댓글