Part B: For Loop Program – using Java
Write a program to compute the sum of the first N Fibonacci numbers, where N is an integer that is input by the user. Once it computes the sum, the program will prompt the user for a new value of N. The program will exit if the user enters a non-integer number or string (such as “quit”) instead of an integer.
Additionally:
- For both the above problems, the first four numbers of the Fibonacci sequence are 0, 1, 1, and 2.
- Part B must use at least one For loop, but may also use while loops.
