4) The user provides an integer N, then prints the calculation of alternate add and subtract of the
Fibonacci series up to that Nth term. It should be done using recursion. The program will only end if 0 or
1 is given as input.
Example:
Enter N: 4
Sum: 0+1-1+2=2
Enter N:5
Sum: 0+1-1+2-3=-1
Enter N: 0
End.
5) The lengths of the adjacent/opposite sides of a right triangle should be taken from the user, and
suppose that the lengths of these two sides (adjacent & opposite) are equal. You must display a right-
facing triangle with the character * filled in according to the lengths of its adjacent and opposite lines, as
shown:
Enter the length of a right triangle's adjacent/opposite side: 10
**********
6) Create a class "Array" which creates a 3 x 3 (2D) array and prints the result of the summation like the
following:
If the array is:
1 3 4
5 0 6
9 7 4
The result will be 23 (=3+0+9+7+4).
Show at least two Array class objects.