So I figured this would be a good place to start to familiarize myself with the language at a beginners level, as many have suggested.

```
fn main() {
println!("Fibonacci Sequence! I'll print numbers in the fibonacci sequence up to and/or including the number you select.");
let mut input = String::new();
loop {
println!("Enter a number!");
io::stdin()
.read_line(&mut input)
.expect("Failed to read line");
let input: u32 = match input.trim().parse() {
Ok(num) => num,
Err(_) => continue,
};
fibonacci(input);
}
}
fn fibonacci (end: u32) {
let mut x = 0;
let mut y = 1;
loop {
let z = x + y;
if z >= end {break};
println!("{}", z);
x = y;
y = z;
}
}
```

this is the code i wrote. I'm not really worried about optimization or speed right now (thought i'm not averse to advice in that direction!) my question is why the fibonacci function only works the first time i run it. Every other time i input a number, it just resets the loop without printing out any numbers.