Anishluke92 / RubySolution

Problem solving using Ruby programming language
0 stars 1 forks source link

bunnyEars #32

Closed danielpaul closed 3 years ago

danielpaul commented 4 years ago

We have a number of bunnies and each bunny has two big floppy ears. We want to compute the total number of ears across all the bunnies recursively (without loops or multiplication).

bunnyEars(0) → 0
bunnyEars(1) → 2
bunnyEars(2) → 4