Tuesday, 27 October 2015

Fibonacci Series Using JAVA

Fibonacci Series Using JAVA


More Details About Fibonacci Series: Click Here

Program in JAVA

public class fibo{
public static void main(String args[]){
int no=10;
int next,prev,sum;
next=1;
prev=0;
for(int i=0;i<no;i++){
System.out.print(prev+"  ");
sum=next+prev;
prev=next;
next=sum;
}
}
}

Download Program File: Click Here

Output:


No comments:

Post a Comment