Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int two1 (int n) {
- if (n == 0) {
- return 1;
- } else {
- return 2 * two1(n - 1);
- }
- }
- public static int two2 (int n) {
- if (n == 0) {
- return 1;
- } else {
- return two2(n - 1) + two2(n - 1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement