-
[java]백준 별 찍기 - 2 2439번알고리즘 문제풀이/백준(자바) 2023. 4. 8. 21:10
코드
import java.util.Scanner; public class BOJ_2439 { public static void main(String[] args) { Scanner in = new Scanner(System.in); int s=in.nextInt(); for(int i=1; i<=s; i++){ for (int j = 1; j<=s-i; j++) { System.out.print(" "); } for (int j = 1; j<=i; j++) { System.out.print("*"); } System.out.println(); } in.close(); } }
링크
https://www.acmicpc.net/problem/2439
'알고리즘 문제풀이 > 백준(자바)' 카테고리의 다른 글
[java]백준 최댓값 2562번 (0) 2023.04.10 [java]백준 코딩은 체육과목 입니다 25314번 (0) 2023.04.09 [java]백준 별 찍기 - 1 2438번 (0) 2023.04.07 [java]백준 A+B - 4 10951번 (0) 2023.04.07 [java]백준 A+B - 8 11022번 (0) 2023.04.06