RB
rb
1
2
3
4
5
6
##Fibonacci Sequence is the sequence in which the initial two terms are defined as zero and one and then onwards, the terms represent the sum of previous two terms!
n = 99 # Terms of Fibonacci Sequence
a,b = 0, 1
0.upto(n) {puts a;a+=b; a,b= b,a}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run