Skip to content

Commit

Permalink
chapter 1 PoolPuzzleOne
Browse files Browse the repository at this point in the history
  • Loading branch information
Dikendev committed Feb 13, 2023
1 parent 1f29908 commit 1bec8c6
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions head first java/PoolPuzzleOne.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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.print(" ");
x++;
}
}
}

0 comments on commit 1bec8c6

Please sign in to comment.