mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-20 01:04:08 +10:00
This is a longstanding bug, so I'm glad its fixed, even if its only a bandaid. This does break some tests, but I'm too tired and these tests are out of date.
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;
|
|
} |