Skip to main content

Java program to print "Fibonacci Series" using function

Java program to print  "Fibonacci Series" using function up to a particular number.

The Fibonacci series is a type series where each number is the sum of the two that precede it means the addition of the two numbers which came before the new number . It starts from 0 and 1 usually. The Fibonacci sequence is given by 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, and so on. The numbers in the Fibonacci sequence are also called Fibonacci numbers.




OUTPUT:




 

Comments

Popular posts from this blog

How to be more productive: 15 Ways To Increase Your Productivity

15 Ways To Increase Your Productivity Set clear and achievable goals: Define what you want to accomplish and create a  plan to reach those goals. Take breaks: Taking breaks can increase focus and prevent burnout. Avoid procrastination: Tackle tasks as soon as they arise rather than putting them off. Break large tasks into smaller, more manageable parts if needed. Set boundaries: Set boundaries with your time, such as not checking email after a certain hour, to prevent burnout and maintain a healthy work-life balance. Prioritize tasks: Focus on the most important tasks first and avoid distractions. Automate repetitive tasks: Use tools and software to automate repetitive and time-consuming tasks. Minimize multi-tasking: Focus on one task at a time instead of trying to do multiple things at once. Research has shown that multi-tasking can decrease productivity. Stay organized: Keep a clean and organized workspace, prioritize Eliminate distractions: Turn off notifications on your device...

5 simple programs in Java || Java programs for Beginners

5 Simple Java Programs for  Beginners 1.Program to print Hello World public class Main       {                  public static void main(String[] args)                   {                          System.out.println("hello world!")                    }           } output:  hello world! 2.Program to Add two numbers public class Main      {           public static void main(String[] args)                {                     int a = 5;                     int b = 10;        ...