def fibo(i: Int) = { var pre = 0 var curr = 1 var res = 0 print(pre + "\t" + curr) for(e <- 2 to i - 1) { res = pre + curr pre = curr curr = res print("\t" + res) } }