Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. public int bunnyEars2(int bunnies) {
  2. if(bunnies <= 0){
  3. return 0;
  4. }else if(bunnies%2 == 0){
  5. return 3 + bunnyEars2(bunnies-1);
  6. }else{
  7. return 2 + bunnyEars2(bunnies - 1);
  8. }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement