Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn fib_rec(num : u64) -> u64 {
- match num {
- 0 | 1 => num,
- _ => fib_rec(num - 1) + fib_rec(num - 2)
- }
- }
- fn main() {
- println!("{}", fib_rec(45));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement