Question: Write a program that outputs a number in the Fibonacci sequence. The first number in the Fibonacci sequence is 0, the second number is 1,
Write a program that outputs a number in the Fibonacci sequence.
The first number in the Fibonacci sequence is 0, the second number is 1, and the third and higher numbers in the sequence are the sum of the previous 2 numbers in the sequence. So, the third number is 0 + 1 = 1 and the fourth number is 1 + 1 = 2. Use scanf() to read in an integer input, seq, from the user as the sequence number.
Output Example:
Enter a sequence number: 8 13
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
