Java Reference
In-Depth Information
exerCises
You can find suggested solutions to these questions in Appendix A.
1.
Change the code of Question 2 from Chapter 3 so that it's a function that takes as parameters
the times table required and the values at which it should start and end. For example, you
might try the 4 times table displayed starting with
4 * 4
and ending at
4 * 9
.
2.
Modify the code of Question 1 to request the times table to be displayed from the user; the
code should continue to request and display times tables until the user enters
‐1
. Additionally,
do a check to make sure that the user is entering a valid number; if the number is not valid, ask
the user to re‐enter it.