Question: Write a program that asks the user how many Fibonacci numbers to generate and then generate them. Make sure to ask the user to enter
Write a program that asks the user how many Fibonacci numbers to generate and then generate them. Make sure to ask the user to enter the number of numbers in the sequence to generate. (Hint: The Fibonacci sequence is a sequence of numbers where the next number in the sequence is the sum of the previous two numbers in the sequence. The sequence looks like this: 1, 1, 2, 3, 5, 8, 13, )
For example,
if the user enters 2, the output should be: The first 2 Fibonacci numbers are 1, 1.
if the user enters 7, the output should be: The first 7 Fibonacci numbers are 1, 1, 2, 3, 5, 8, 13.
Code in C please
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
