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>
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;
}
}
}
No comments:
Post a Comment
Home
Subscribe to:
Posts (Atom)
No comments:
Post a Comment