Computer Science, asked by amarjeetmurmu, 11 months ago

Write the programs in Java to display the first ten terms of the following series: 0, 1, 2, 3, 6, ................​

Answers

Answered by avinashmurmu99311
41

Explanation:

class series

{

public static void main(String args[])

{

int i,d=0,a=-1,b=2,c=-1;

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

{

d=a+b+c;

if(i>1)

{

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

}

a=b;

b=c;

c=d;

}

}}

pls mark me brainliest

Similar questions