Skip to content

Instantly share code, notes, and snippets.

@strager
Created September 18, 2020 22:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save strager/caff03f1ccabacff53ff7b253c0f4f6f to your computer and use it in GitHub Desktop.
Save strager/caff03f1ccabacff53ff7b253c0f4f6f to your computer and use it in GitHub Desktop.
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