diff --git a/Main.java b/Main.java new file mode 100644 index 00000000..d6f07013 --- /dev/null +++ b/Main.java @@ -0,0 +1,21 @@ +package src; + +import java.util.Scanner; + +public class Main { + + public static void main(String[] args) { + Scanner input = new Scanner(System.in); + boolean isOnRepeat = true; + while (isOnRepeat) { + System.out.println("playing current song"); + System.out.println("would you like to take this song off repeat? If so, answer yes"); + String userInput = input.next(); + + if (userInput.equals("yes")) { + isOnRepeat = false; + } + } + System.out.println("playing next song"); + } +} diff --git a/src/Main.java b/src/Main.java index 30962bf0..d6f07013 100644 --- a/src/Main.java +++ b/src/Main.java @@ -1,3 +1,5 @@ +package src; + import java.util.Scanner; public class Main { @@ -5,5 +7,15 @@ public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); boolean isOnRepeat = true; + while (isOnRepeat) { + System.out.println("playing current song"); + System.out.println("would you like to take this song off repeat? If so, answer yes"); + String userInput = input.next(); + + if (userInput.equals("yes")) { + isOnRepeat = false; + } + } + System.out.println("playing next song"); } }