Complete all of the problems in the LoopFun class. Descriptions and examples for each problem can be found below.
Displays the numbers 1 to 10 in the console.
1
2
3
4
5
6
7
8
9
10
Displays the square numbers up to 100 in the console.
1
4
9
16
25
36
49
64
81
100
Displays the positive even number less then n in the console
n = 20
2
4
6
8
10
12
14
16
18
Calculates the sum of the number from n to, but not including m, and returns the answer.
(5,10)
*** Output ***
35
Should prompt the user "Are we there yet?" until the user enters "Yes". When the user enters "Yes", the program should display "Good!" in the console and exit.
"Are we there yet?"
No
"Are we there yet?"
Spoons
"Are we there yet?"
Yes
Good!
Should use nested loops to produce the following pattern in the console.
*
**
***
****
*****
Should use nested loops to produce a 4x4 table square in the console.
A 4 x 4 table square
| 1 | 2 | 3 | 4 |
| 2 | 4 | 6 | 8 |
| 3 | 6 | 9 | 12 |
| 4 | 8 | 12 | 16 |
Extend your answer to the last question to produce an NxN table square in the console
A 6 x 6 table square
| 1 | 2 | 3 | 4 | 5 | 6 |
| 2 | 4 | 6 | 8 | 10 | 12 |
| 3 | 6 | 9 | 12 | 15 | 18 |
| 4 | 8 | 12 | 16 | 20 | 24 |
| 5 | 10 | 15 | 20 | 25 | 30 |
| 6 | 12 | 18 | 24 | 30 | 36 |
Happy Hacking!