[프로그래머스 문제풀이66]직사각형 별 찍기 자바

이ᄏᄋ·2021년 9월 30일
0
import java.util.Scanner;

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

return 이 아닌 출력을 요구하는 새로운 유형의 문제였다.
하지만 역시 사람들의 많은 원성이 있었고(헷갈려서)
이런 유형의 문제는 사장 되었을려나 ? ㅋㅋ

profile
미쳤다.

0개의 댓글