Computer Science, asked by aritrakayal29, 2 months ago

Write a program in Java to display the first 10 numbers of the

Fibonacci series: 0, 1, 1, ,2,3,_ _ _ _ _ _

write accurately I have to type in computer ( dash should be fullstop)​

Answers

Answered by meenadevi31361
1

Answer:

Let's see the fibonacci series program in java using recursion.

class FibonacciExample2{

static int n1=0,n2=1,n3=0;

static void printFibonacci(int count){

if(count>0){

n3 = n1 + n2;

n1 = n2;

n2 = n3;

System.out.print(" "+n3);

Similar questions