HomeBlogGitHubLinkedInRésumé

Test blog

07 July, 2019 - 1 min read

Running this as a test.

This a test blog.

git clone https://www.github.com/AgamJolly/BulkRepoDelete.git

Java program to print Fibonacci Series using recursion.

I wrote the code written below myself, so you better appreciate 😤

public class JollyTest {
   public static long fib(long n) {
      if ((n==0) || (n==1))
         return n;
      else
         return fib(n-1) + fib(n-2);
   }
   public static void main(String[] args) {
      System.out.println(fib(0) + ", ");
      System.out.println(fib(1) + ", ");
      System.out.println(fib(2) + ", ");
      System.out.println(fib(3) + ", ");
      System.out.println(fib(4) + ", ");
      System.out.println(fib(5));
   }
}