fn main() {
    println!("-459.67 F == {}", fht_to_celsius(-459.67));

    let mut input = String::new();
    let n = {
        println!("Print fib(n) for n: (choose 1-90, I'm not using bigints)");
        std::io::stdin().read_line(&mut input)
            .expect("Readline failed");

        match input.trim().parse() {
            Ok(num) => num,
            Err(_)  => 0,
        }
    };

    if n < 20 {
        println!("fib({}) = {}", n, fib(n));
    } else if n <= 90 {
        println!("fib({}) = {}", n, fib_no_brute(n));
    }
}

fn fht_to_celsius(fahrenheit: f32) -> f32 {
    (fahrenheit - 32.0) * 5.0 / 9.0
}

fn fib(n: u32) -> u32 {
    if n == 0 || n == 1 {
        return n;
    }
    fib(n-1) + fib(n-2)
}

fn fib_no_brute(n: u32) -> u64 {
    if n == 0 || n == 1 

    let mut tmp0 = 0;
    let mut tmp1 = 1;
    let mut result = 0;
    for _ in 2..n {
        result = tmp0 + tmp1;
        tmp0 = tmp1;
        tmp1 = result;
    }
    return result;
}

{
        return n as u64;
    }