Sunday, February 20, 2011

Program to find fibonacci series in java


Java code to print Fibonacci series





import java.io.*;




class Test {



public static void main(String[] args) throws IOException {



int i=0,j=1,k=2,r,f;

System.out.println("Enter the range:");

BufferedReader br=new BufferedReader(new InputStreamReader (System.in));

r=Integer.parseInt(br.readLine());

System.out.println("FIBONACCI SERIES: ");

No comments:

Post a Comment