import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
for(int i=0;i<num;i++){
for(int j=num-1;j>i;j--){
System.out.print(" ");
}
for(int z=0;z<=i;z++){
System.out.print("*");
}
System.out.println();
}
}
}
'Studying JAVA > 백준' 카테고리의 다른 글
[3단계]for문 사용해보기-2441번 별찍기(4) (0) | 2019.02.20 |
---|---|
[3단계]for문 사용해보기-2440번 별찍기(3) (0) | 2019.02.20 |
[3단계]for문 사용해보기-2438번 별찍기 (0) | 2019.02.20 |
[3단계]for문 사용해보기-2739번 구구단 (0) | 2019.02.20 |
[3단계]for문 사용해보기-2742번 기찍N (0) | 2019.02.20 |