반응형
내 코드
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();
//System.out.println(a + b);
for(int i = 0 ; i < b ; i++) {
for(int j = 0 ; j < a ; j++) {
System.out.print("*");
}
System.out.println();
}
}
}
반응형
'코테 > 프로그래머스' 카테고리의 다른 글
[프로그래머스/Lv. 1] x만큼 간격이 있는 n개의 숫자 (0) | 2023.02.19 |
---|---|
[프로그래머스/Lv. 1] 자릿수 더하기 (0) | 2023.02.19 |
[프로그래머스/Lv. 1] 문자열 내 p와 y의 개수 (0) | 2023.02.19 |
[프로그래머스/Lv. 1] 약수의 합 (0) | 2023.02.18 |
[프로그래머스/Lv. 1] 두 정수 사이의 합 (0) | 2023.02.18 |