Guest User

Untitled

a guest
Jul 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. fn main() {
  2. let mut x = 0;
  3. let mut y = 1;
  4. for _ in 1..10 {
  5. (x, y) = fib(x, y);
  6. println!("{}", y);
  7. }
  8. }
  9.  
  10. fn fib(one: i32, two: i32) -> (i32, i32) {
  11. return (two, one + two);
  12. }
Add Comment
Please, Sign In to add comment