6c055a0435
As a whole, this is still tentative.
16 lines
242 B
Plaintext
16 lines
242 B
Plaintext
//calculate the nth fibonacci number, and print it
|
|
|
|
var counter: Int = 0;
|
|
|
|
var first: Int = 1;
|
|
var second: Int = 0;
|
|
|
|
while (counter < 100_000) {
|
|
var third: Int = first + second;
|
|
first = second;
|
|
second = third;
|
|
|
|
print third;
|
|
|
|
++counter;
|
|
} |