코테연습/프로그래머스

코딩테스트입문 > 직각삼각형 출력하기 Java

메각이 2023. 9. 5. 14:34
728x90

 

 

https://school.programmers.co.kr/learn/courses/30/lessons/120823

 

 

 


 

기본 별찍기 문제~~ 

 

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 i = 1; i <= n; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print('*');
            }
            System.out.println(); 
        }
    }
}

 

 

 

 


 

 

그 유명한 희표좌 ㅋㅋㅋㅋㅋㅋㅋㅋ

웃기넹 

 

 

 

 

 

728x90