Write a program in Java to display fibonacci series up to 10 numbers.
Share
Write a program in Java to display fibonacci series up to 10 numbers.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Verified answer
Answer:-
Please see the attached image here
Necessary:-
To mark me as brainliest and thanks me if you like my answer also vote me as per ur choice. Hope my answer will be helpful!!!!
Answer:
class fib
{
void main(int n)
{
//variable declaration and initialisation
int a = 0, b = 1 , p;
System. out. print length(a +"\t"+ b) ;
for(int i = 1; i <8; i++)
{
p = a + b;
System. out. println(p) ;
a = b;
b = p;
}
}
}