Guest User

Untitled

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