Created
September 16, 2024 00:41
-
-
Save vdeemann/788820722317f4b995b0e871c61d2f05 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
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