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

JOY·2021년 8월 6일
0

[CodingTest] Java

목록 보기
2/61
post-thumbnail

프로그래머스 코딩테스트연습
연습문제 직사각형 별찍기
난이도 Level1

🙂 문제

https://programmers.co.kr/learn/courses/30/lessons/12969?language=java

😀 풀이

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();

        for(int i =0; i<b; i++){
            for(int j=0; j<a; j++){
                System.out.print("*");
            }
            System.out.println();
        }       
        
    }
}
profile
Just Do IT ------- 🏃‍♀️

0개의 댓글

Powered by GraphCDN, the GraphQL CDN