In java Write a simple program that will generate a well-formatted addition table. Prompt the user to enter a lower bound and an upper bound for the table. Then print the table with row headers, column headers, and a “+” in the upper left corner. Allow 6 spaces for printing the numeric value For example: Enter the lower bound: -2 Enter the upper bound: 3 +| -2| -1| 0| 1| 2| 3| ------|------|------|------|------|------|------| -2| -4| -3| -2| -1| 0| 1| ------|------|------|------|------|------|------| -1| -3| -2| -1| 0| 1| 2| ------|------|------|------|------|------|------| 0| -2| -1| 0| 1| 2| 3| ------|------|------|------|------|------|------| 1| -1| 0| 1| 2| 3| 4| ------|------|------|------|------|------|------| 2| 0| 1| 2| 3| 4| 5| ------|------|------|------|------|------|------| 3| 1| 2| 3| 4| 5| 6| ------|------|------|------|------|------|------|
In java
Write a simple
Enter the lower bound:
-2
Enter the upper bound:
3
+| -2| -1| 0| 1| 2| 3|
------|------|------|------|------|------|------|
-2| -4| -3| -2| -1| 0| 1|
------|------|------|------|------|------|------|
-1| -3| -2| -1| 0| 1| 2|
------|------|------|------|------|------|------|
0| -2| -1| 0| 1| 2| 3|
------|------|------|------|------|------|------|
1| -1| 0| 1| 2| 3| 4|
------|------|------|------|------|------|------|
2| 0| 1| 2| 3| 4| 5|
------|------|------|------|------|------|------|
3| 1| 2| 3| 4| 5| 6|
------|------|------|------|------|------|------|
You do NOT need to include input validation in your program.
Step by step
Solved in 3 steps with 1 images