// Fibonacci - Recursive function with while loop
import Std::Io::{PrintLine, PrintInt};


func Fibonacci(n: int) -> int {
    if n <= 1 {
        return n;
    }
    return Fibonacci(n - 1) + Fibonacci(n - 2);
}

func Main() -> int {
    PrintLine("Fibonacci sequence:");
    
    var i: int = 0;
    while i < 10 {
        let fib: int = Fibonacci(i);
        PrintInt(fib);
        PrintLine("");
        i = i + 1;
    }
    
    return 0;
}
