Created
September 18, 2020 22:47
-
-
Save strager/caff03f1ccabacff53ff7b253c0f4f6f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void countupA(int n) { | |
if (n == 0) { | |
System.out.println("blast off"); | |
} else { | |
countupB(n - 1); | |
System.out.println(n); | |
} | |
} | |
public static void countupB(int n) { | |
if (n == 0) { | |
System.out.println("blast off"); | |
} else { | |
countupC(n - 1); | |
System.out.println(n); | |
} | |
} | |
public static void countupC(int n) { | |
if (n == 0) { | |
System.out.println("blast off"); | |
} else { | |
countupD(n - 1); | |
System.out.println(n); | |
} | |
} | |
public static void countupD(int n) { | |
if (n == 0) { | |
System.out.println("blast off"); | |
} else { | |
countupE(n - 1); | |
System.out.println(n); | |
} | |
} | |
public static void countupE(int n) { | |
if (n == 0) { | |
System.out.println("blast off"); | |
} else { | |
System.out.println("NOT IMPLEMENTED"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment