006-002-001

Rectangle Stars Pattern

Easy

Problem Description

In this problem, you will create a program that uses an outer for loop to control the number of rows and an inner for loop to control the number of columns, printing a rectangular grid of '' characters line by line to standard output. Read the number of rows and columns from standard input, then print a grid of '' characters with the specified dimensions.

Test Cases

※ Output examples follow programming industry standards

Normal case
Input:
3
5
Expected Output:
*****
*****
*****
Normal case
Input:
2
3
Expected Output:
***
***

Your Solution

Current Mode: My Code
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Write your code here

sc.close();
}
}
0 B / 5 MB

You have 10 free executions remaining