Skip to content

Instantly share code, notes, and snippets.

@vdeemann
Created September 16, 2024 00:41
Show Gist options
  • Save vdeemann/788820722317f4b995b0e871c61d2f05 to your computer and use it in GitHub Desktop.
Save vdeemann/788820722317f4b995b0e871c61d2f05 to your computer and use it in GitHub Desktop.
import java.util.*;
public class PoolPuzzleOne {
public static void main(String[] args) {
int x = 0;
while(x<4) {
System.out.print("a");
if (x<1) {
System.out.print(" ");
}
System.out.print("n");
if (x>1) {
System.out.print(" oyster");
x = x + 2;
}
if (x==1) {
System.out.print("noys");
}
if (x<1) {
System.out.print("oise");
}
System.out.println();
x = x + 1;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment