This program is about using for loops. It asks the user for a number n and prints Fibonacci series with first n numbers.
Posted: Sun May 15, 2022 1:00 pm
This program is about using for loops. It asks the user for a number n and prints Fibonacci series with first n numbers. First two terms of the Fibonacci series are 1 and all the following terms are sum of its previous two terms. Please use a for loop to calculate the series. Please see the sample output.
Enter length of the Fibonacci series (3-20) 12 The series is : 1 1 2 3 5 8 13 21 34 55 89 144
Enter length of the Fibonacci series (3-20) 12 The series is : 1 1 2 3 5 8 13 21 34 55 89 144