Written by
java-style
on
on
[백준 BAEKJOON] 2439번 별 찍기 - 2 문제 (JAVA)
[백준 BAEKJOON] 2439번 별 찍기 - 2 문제 (JAVA)
소스코드
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int count = sc.nextInt(); sc.close(); for (int i = 1; i <= count; i++) { //행 출력 for (int j = count; j > i; j--) { //공백 출력 System.out.print(" "); } for (int j = 1; j <= i; j++) { //별 찍기 System.out.print("*"); } //for System.out.println(); } //for } // main } //class
from http://choitaetae.tistory.com/42 by ccl(A) rewrite - 2021-09-07 01:00:55