JAVA-Record-01)Write a Java program to print Fibonacci series using for loop.
01) AIM:-
Write a Java program to print Fibonacci series using for loop.
Algorithm:
- Start
- Declare a variable for the total number of terms.
- Ask the user to initialize the number of terms.
- Print the first and second numbers of the series.
- Use a for loop to print the Fibonacci series up to that number of terms.
- Update the series terms in each iteration.
- Print the Fibonacci series.
- Stop
Flow-Chart
Code:01
Output:01
Output:02
Comments
Post a Comment