Search This Blog

Sunday 16 October 2016

FIBONACCI SERIRS

public class fibonacci
{
    public static void rmkp(int n)
  { 
     int a = 0;
     int b = 1;
     int c;
     int i= 3;
     System.out.print(a +" "+ b + " "+ " ");  
     while( i <=n)
     {
       c = a + b;
       System.out.print(c);
       a = b;
       b = c;
       i++ ;
     }

    }
    
 }


No comments:

Post a Comment

Make a JAVA program for a Toystore. This program suggest the toy based on the inputs users gives like age , gender , etc

 //editor used - IntelliJ IDEA package ToyStore; import javax.swing.*; import java.awt.event.*; import java.util.Scanner; //here you can edi...