Write a program to generate the following series upto 10 terms.
0,1,1,2,3,5,8,13,21,34
Answers
Answered by
1
Answer:
The trem of above is 10,25,13,21,34,13,
Explanation:
Hope it help you
Answered by
12
Answer:
//Program to generate the Fibbonacci series upto ten term
//0,1,1,2,3,5,8,13,21,34
package Programmer;
public class Ser{
public static void main (String ar []){
int a=0,b=1,c=0;
for(int I=1;I<=10;I++){
System.out.print(a+" ");
c=a+b;
a=b; b=c;
}
}
}
Variable Description:-
- a,b:- Local Variables
- c:- to find the sum of a and b
- I:- loop Variable
•Output Attached
Attachments:
Similar questions