[프로그래머스]직사각형 별찍기

mongs_Develop·2022년 4월 26일
0

Programmers-Level1-Java

목록 보기
1/30
post-thumbnail
  • 문제 & 예시

  • 소스코드

import java.util.Scanner;

// 직사각형 별찍기 
public class test01 {
	public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();

        for(int i=0;i<b;i++) {
        	for(int j=0;j<a;j++) {
        		System.out.print("*");
        	}
        	System.out.println("");
        }
    }
}
  • consol
profile
개 발 인생

0개의 댓글