직사각형 별찍기

han.user();·2023년 4월 16일
0

프로그래머스

목록 보기
78/87
post-thumbnail

import java.util.Scanner;

class Solution {
    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();
        }
    }
}
profile
I'm still hungry.

0개의 댓글