Question: 2) Task: Practice with FOR loops (10 pts) -Create a program that lists out Fibonacci numbers based upon user input. The Fibonacci sequence is a

 2) Task: Practice with FOR loops (10 pts) -Create a program

2) Task: Practice with FOR loops (10 pts) -Create a program that lists out Fibonacci numbers based upon user input. The Fibonacci sequence is a series of values where every number after the first two is the sum of the two preceding ones: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4184, 6765, etc. a) Create a new package "task2" and a new class in that package "Fibonacci". Add the empty "main" method in your class. b) Problem: (No functions are needed for this problem) o main: In the main, prompt the user to enter the number of Fibonacci values to generate then read and save their input value. Using a FOR loop, generate n Fibonacci values, where 'n' is the value the user entered. The output should be formatted as follows: user's number> Fibonacci numbers: , value>, , value>, Example: 12 Fibonacci numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 Done

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!