Last active
May 8, 2017 01:31
-
-
Save dgadiraju/8e57dd20b00419752ad5c42edd0f6dae to your computer and use it in GitHub Desktop.
This file contains hidden or 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
val a = 10 | |
var pre = 0 | |
var curr = 1 | |
println(pre) | |
println(curr) | |
var res = 0 | |
for(e <- 2 to a - 1) { | |
res = pre + curr | |
println(res) | |
pre = curr | |
curr = res | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment