Write anbspjavanbspprogram that generates an array of


Write a Java program that generates an array of Fibonacci numbers. Add comments to the program.

Specifications:

1. Fills a one-dimensional array with the first 30 Fibonacci numbers using a calculation to generate the numbers. Note: it is not permissible to initialize the array explicitly with the Fibonacci series' first 30 numbers!

2. Prints the Fibonacci numbers in the array

3. Prompts the user to input an (integer) number between 1 and 30 (inclusive) and prints in response to the user entry: The nth Fibonacci number is X, where n is the number input by the user and X is the Fibonacci number in the nth position. (Remember that array indexes for the elements of the array start at 0)

4. Checks that the user has not input a number lower than 1 or higher than 30

You can check if you have the right numbers here:

Solution Preview :

Prepared by a verified Expert
Business Management: Write anbspjavanbspprogram that generates an array of
Reference No:- TGS01669983

Now Priced at $20 (50% Discount)

Recommended (91%)

Rated (4.3/5)