Question: Fill the blank. [2 marks] Insert the missing statements in the following code fragment. The loop is intended to keep prompting until the user enters
![Fill the blank. [2 marks] Insert the missing statements in the](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3ae4c393e6_89966f3ae4bcd0d6.jpg)
Fill the blank.
[2 marks] Insert the missing statements in the following code fragment. The loop is intended to keep prompting until the user enters a positive number. Scanner in = new Scanner(System.in); double value; boolean done = false; while { System.out.print("Please enter a positive number: "); value = in.nextDouble(); if (value > 0) done = true; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
