Question: (JavaScript) Im looking to add to this code to do the following: Add a break command, asking if they want to stop. And if so,
(JavaScript)
Im looking to add to this code to do the following:
Add a break command, asking if they want to stop. And if so, surface.
Every time they do deeper, add a printout for a random fish. (At least 3 types)
public static void main(String[] args) { Scanner inputReader = new Scanner(System.in); System.out.println("Already, get those flippers and wetsuit on System.out.println("Here we gooo000000.....! *SPLASH*"); we're going diving!"); int depthDivedInFt = : 0; while(depthDivedInFt = 20000) { System.out.println("Uhhh, I think I see a kraken, guys..."); System.out.println("TIME TO GO!"); break; } depthDivedInFt += 1000; } System.out.println(" "); System.out.println("We ended up swimming + depthDivedInFt + " feet down."); System.out.println("I bet we can do better next time!"); } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
