본문 바로가기

백준

2438 별찍기

 

 

 


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class Main {
	
 public static void main(String[] args) throws IOException {
	 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	 int N = Integer.parseInt(br.readLine());
	 for(int i = 1; i <= N; i++) {
		 for(int j = 0; j < i; j++) {
			 System.out.print("*");
		 }
		 System.out.println();
	 }
 }
}

'백준' 카테고리의 다른 글

2475 검증수  (0) 2021.10.14
1546 평균  (0) 2021.10.12
1918 후위 표기식  (0) 2021.09.30
2609 최대공약수와 최소공배수  (0) 2021.09.27
1978 소수 찾기  (0) 2021.09.18