write a program in python to print a series :0,1,2,3,5,8,13.....20 terms
Answers
Answered by
0
Explanation:
look below
I will edit the answer
import java.util.*;
public class Q32c
{
public static void main()
{
int numfirst,numsecond,numthird;
numfirst = 1;
numsecond = 2;
double sum = 0.0;
System.out.println("The fibonacci series");
System.out.println(numfirst+"\n"+numsecond);
for(int i=3;i<=20;i++)
{
numthird = numfirst+numsecond ;
System.out.println(numthird);
numfirst=numsecond ;
numsecond=numthird ;
}
}
}
MARK ME AS THE BRAINLIEST ANSWER
Similar questions