Question: Write a program that reads in 2 numbers, call them n and m. Compute the nth Fibonicci number and the mth Fibonacci number and then

Write a program that reads in 2 numbers, call them n and m. Compute the nth Fibonicci number and the mth Fibonacci number and then find the greatest common factor of those two numbers. For example, if I typed in 11 and 16, the answer would be 5. The 11th Fibonacci number is 55 and the 16th one is 610. The greatest common factor is 5. You should ensure the user types in a positive number and ask again if the user doesn't.(Java)

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!