Question: a program that prints a pattern similar to the following pattern in the expected output below. Prompt the user for two integers between 1 and

a program that prints a pattern similar to the following pattern in the expected output below.

Prompt the user for two integers between 1 and 10, representing number of rows and columns and print a grid of integers from 1 to (rows * columns).

Keep prompting the user for a value until the user presses 'n' or 'N' for No.

If the user enters 'y' or 'Y' for yes, then prompt again for the rows and columns and display the grid.. If an 'n' or 'N' is entered, then quit the program.

Hint: use nested for loops

Expected output:

Welcome to the Grid Pattern Program

Enter the number of rows (1 -10 ): 4

Enter the number of column (1-10) :6

1, 5, 9, 13, 17, 21

2, 6, 10, 14, 18, 22

3, 7, 11, 15, 19, 23

4, 8, 12, 16, 20, 24

Do you want to do it again? Press 'Y' for yes and 'N' for No: Y

Enter the number of rows (1 -10 ): 12

Please enter a number between 1 -10: 3

Enter the number of column (1-10) :14

Please enter a number between 1-10: 3

1, 4, 7

2, 5, 8

3, 6, 9

Do you want to do it again? Press 'Y' for yes and 'N' for No: N

Goodbye!!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here is the Java program that meets the requirements described java import javautilScanner public cl... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!