/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.Scanner;
/* Name of the class has to be "Main" only if the class is public. */
public class DoLoop
{
public static void main
(String[] args
) {
Scanner in
= new Scanner
(System.
in);
double value;
do
{
System.
out.
print("Enter a number >= 0: "); value = in.nextDouble();
}
while (value < 0);
double root
= Math.
sqrt(value
); System.
out.
println("The square root of the number is " + root
); 23 }
24 }
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnV0aWwuU2Nhbm5lcjsKCi8qIE5hbWUgb2YgdGhlIGNsYXNzIGhhcyB0byBiZSAiTWFpbiIgb25seSBpZiB0aGUgY2xhc3MgaXMgcHVibGljLiAqLwpwdWJsaWMgY2xhc3MgRG9Mb29wIAp7CnB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpCnsKU2Nhbm5lciBpbiA9IG5ldyBTY2FubmVyKFN5c3RlbS5pbik7Cgpkb3VibGUgdmFsdWU7CmRvCnsKICAgIFN5c3RlbS5vdXQucHJpbnQoIkVudGVyIGEgbnVtYmVyID49IDA6ICIpOwogICAgdmFsdWUgPSBpbi5uZXh0RG91YmxlKCk7CiAgICB9CiAgICAgIHdoaWxlICh2YWx1ZSA8IDApOwogICAgICBkb3VibGUgcm9vdCA9IE1hdGguc3FydCh2YWx1ZSk7CiAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiVGhlIHNxdWFyZSByb290IG9mIHRoZSBudW1iZXIgaXMgIiArIHJvb3QpOwogMjMgICAgIH0KIDI0ICB9