for문을 이용하여 문제 해결
n, m을 입력 받을 때
1. 첫번째 for문은 "행" n줄 만큼
2. 두번째 for문은 "열"로 생각하여 *을 m개 만큼 출력해주면 됩니다
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();
}
}
}