Question: Write a Java program that reads two integer values from the user. The first integer is a value between 1 and 31, inclusive, representing the
Write a Java program that reads two integer values from the user. The first integer is a value between 1 and 31, inclusive, representing the number of days in a month. The second integer is a value between 0 and 6, inclusive, indicating the offset value (the number of positions that should be skipped for the first row of output. Your program should use the input values to print a simple grid of numbers corresponding to a typical calendar month (i.e., several rows of up to 7 integers each). You do not need to produce perfect spacing, but each "day" should have at least one space between itself and its neighboring values. For example, given 31 days and an offset of 2, your program would print something like: 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
