[프로그래머스]직각삼각형 출력하기

박예림·2023년 3월 9일
0

코테

목록 보기
51/132

import java.util.Scanner;

public class Solution {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        
        for(int j=1; j<=n; j++){ //""과 * 모두 개수는 계속 증가한다.
            for (int i=0; i<j; i++){
                System.out.printf("*");
            }
            System.out.println("");
        }
    }
}
profile
응애 나 아기개발자

0개의 댓글