In our site we will provide the technical information that user mostly search.
Menu
Home
Java
C
C++
SEO
Common Interview Questions
Java Virtual Machine
Java Database Connectivity
Basic Java Programs
Basic C Programs
Basic C Programs
Basic Java Programs
!doctype>
Monday, 7 May 2012
JAVA program to design Fibonacci series
class fibo
{
public static void main(String args[])
{
int prev, next, sum, n,a=0;
System.out.println(+a);
prev=next=1;
for(n=1;n<=10;n++)
{
System.out.println(prev);
sum=prev+next;
prev=next;
next=sum;
}
}
}
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)