728x90
출처-https://www.acmicpc.net/problem/2441
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;i>=1;i--) {
for (int j=1;j<=count-i;j++)
System.out.print(" ");
for (int j=1;j<=i;j++)
System.out.print("*");
System.out.println();
}
}
}
728x90
'Problem Solving > BOJ' 카테고리의 다른 글
[백준, BOJ 2445] 별 찍기 - 8 (java) (0) | 2020.08.13 |
---|---|
[백준, BOJ 2442] 별 찍기 - 5 (java) (0) | 2020.08.13 |
[백준, BOJ 2440] 별 찍기 - 3 (java) (0) | 2020.08.13 |
[백준, BOJ 2439] 별 찍기 - 2 (java) (0) | 2020.08.13 |
[백준, BOJ 2438] 별 찍기 - 1 (java) (0) | 2020.08.13 |