Last active
May 7, 2024 23:33
-
-
Save helderlj/dfc70f39ed594c51d2a180a39760301b to your computer and use it in GitHub Desktop.
Calculo de Fibonacci da Flutterando
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
final int iterations = 10; | |
int ant1 = 0; | |
int ant2 = 1; | |
final fibo = List.generate(iterations, (i){ | |
var temp = ant1; | |
ant1 = ant2; | |
ant2 = temp + ant2; | |
return ant1; | |
}); | |
print(fibo); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment