fork download
  1. object FibonacciLister {
  2. def main(args: Array[String]) {
  3. val n = args(0).toInt
  4. var (a, b) = (0, 1)
  5. while (b <= n) {
  6. print(b + " ")
  7. var olda = a
  8. a = b
  9. b = a + b
  10. }
  11. println
  12. }
  13. }
  14.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty