728x90
출처-https://www.acmicpc.net/problem/2439
728x90
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scan=new Scanner(System.in);
int count=scan.nextInt();
for (int i=count-1;i>=0;i--) {
for (int j=1;j<=i;j++)
System.out.print(" ");
for (int j=1;j<=count-i;j++)
System.out.print("*");
System.out.println();
}
}
}
728x90
'Problem Solving > BOJ' 카테고리의 다른 글
[백준, BOJ 2441] 별 찍기 - 4 (java) (0) | 2020.08.13 |
---|---|
[백준, BOJ 2440] 별 찍기 - 3 (java) (0) | 2020.08.13 |
[백준, BOJ 2438] 별 찍기 - 1 (java) (0) | 2020.08.13 |
[백준, BOJ 10818] 최소, 최대 (java) (0) | 2020.08.08 |
[백준, BOJ 8393] 합 (java) (0) | 2020.08.08 |