Guest User

Untitled

a guest
Jun 28th, 2021
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. int countStrings(int n) {
  2. if (n <= 0)
  3. return 0;
  4.  
  5. if (n == 1)
  6. return 2;
  7.  
  8. return countStrings(n - 1) + countStrings(n - 2);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment