Computer Science, asked by LoknathDas31, 8 months ago

Wap in java to display the first 10 terms of the Fibonacci series ​

Answers

Answered by vaibhav3755
4

HEY MATE HERE IS YOUR ANSWER,

public class Fibonacci

{

public static void main(String arts[])

{

int N1 = 0, N2=1, N3, i, count=10;

System.out.println(N1+" "+N2)

for(i=2; i<count; i++)

{

N3 = N1+N2;

System.out.println(" "+N3);

N1=N2;

N2=N3;

}

}

}

Similar questions