You will take int two length of the side of a rectangle (n * m). You will then use a number of the character ‘O’ to print a rectangle to the screen.
The rectangle will be n ‘O’ in one side and m ‘O’ in other side. So id the user enters 4(col) and 3(row), the rectangle should look like:
OOOO
OOOO
OOOO
Declare 2 variables: 1 for the number of row, and 1 for the number of col.
Prompt the user to input the number of row and the number of col.
Use loops (Hint: consider nest loops) to display the rectangle.
Note : You do not have to follow a particular input/output format, but I should be able to understand how to use and understand your program before looking at the code
Note: Don’t forget input validation! What’s a valid value for a row or a col?
Note: Does your program has the input limitation? (e.g. the range of input?)
What I Have so far:
public static void main(String[]args){
int row;
int column;
Scanner input = new Scanner(System.in);
System.out.print("Please enter an integer (row) greater than 0 and less than 15: ");
row = input.nextInt();
System.out.print("Please enter an integer (column) greater than 0 and less than 15: ");
column = input.nextInt();