YJ의 새벽

프로그래머스(0) - 직각삼각형 출력하기 본문

코딩테스트연습/프로그래머스

프로그래머스(0) - 직각삼각형 출력하기

YJDawn 2024. 3. 13. 14:47

 

 

 

 

 

import java.util.Scanner;

public class SolutionMain {
    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.println();
        }
    }
}
Comments