본문 바로가기
with my rubber duck/codingTest

백준 자바 별 찍기 - 3

by stilinski 2022. 4. 15.
728x90

 

 

 

 

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
	
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	for(int i = 0;i<n;i++) {
	    for(int j =n-1;j>=i;j--) {
		System.out.print("*");
	    }
	    System.out.println();
	}

    }

}

짱쉽네~

728x90

댓글