Write a Java application to print out the numbers 10 through 49 in the following manner:

10 11 12 13 14 15 16 17 18 19

20 21 22 23 24 25 26 27 28 29

30 31 32 33 34 35 36 37 38 39

40 41 42 43 44 45 46 47 48 49

Try to develop the program code so that it can be extended easily to handle any range of values. You can do this modification in two ways: with a nested-for statement or with modular arithmetic. (Modulo arithmetic is using the remainder of a division calculation to restrict a variable to a given range of numbers based on some counter variable. For example, if you have a variable that is increased by 1 in a loop and use the modulus operator ( % ) to calculate the remainder of this variable with a value of 10, then as the variable’s value increases the modulus operator will return a value of between 0 and 9:

i i % 10

0 0

1 1

2 2

3 3

4 4

5 5

6 6

7 7

8 8

9 9

10 0

11 1

12 2

13 3

14 4

15 5

16 6

17 7

18 8

19 9

20 0

21 1