손코딩

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

Java

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

활시현 2021. 1. 26. 09:35
728x90
728x90

import java.util.Scanner;

public class Solution {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        for(int j=0; j<m; j++){
            for(int i=0; i<n; i++){
                System.out.print("*");
            }
            System.out.println();
        }
    }
}

별찍기 너무 오랜만이다ㅋㅋㅋ 이런게 은근히 헷갈린다구ㅠㅠ