Take term1=0 and term2=1
Nextterm=t1+t2
Series=0 1 1 2 3 5 8 13 21 34
We can use for,while loop
Factorial=n*n-1
We can use both for and while loop