이 문제에는 표준 입력으로 두 개의 정수 n과 m이 주어집니다.
별(*) 문자를 이용해 가로의 길이가 n, 세로의 길이가 m인 직사각형 형태를 출력해보세요.
for 반복문 처음 배울때 했던건데 System.out.print("");안하고
args[i] += ""식으로 헤매고 있었다...
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();
for(int j=0 ; j < b ; j++){
for(int i = 0 ; i < a ; i++){
System.out.print("*");
}
System.out.println();
}
}
}