Computer Science, asked by prabhatranjan8709, 5 months ago

Write a program to find the first 10 numbers of Fibonacci series (i.e. 1, 1, 3, 5, 8, 13…..) Fibonacci series is such a series which start from 1 and 1and subsequent numbers are the sum of the previous two numbers.​

Answers

Answered by ashokkumar0902
0

Explanation:

udsuususususussuusususus

Answered by duragpalsingh
0

Question:

Write a program to find the sum of 1st 10 numbers of Fibonacci series, i.e. 1,1,2,3,5,8,13…. Fibonacci series is such a series which starting from 1 and 1, and subsequent numbers are the sum of the previous two numbers.

Solution:

Language used: Java

public class FibSum

{

static void main()

{

int i,a=1,b=0,c;

System.out.println("Fibonacci series =");

for(i=1;i<=10;i++)

{

c=a+b;

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

a=b;

b=c;

}

}

}

Similar questions