import java.util.Scanner; public class SquareR { public static void main( String[] args ) { Scanner keyboard = new Scanner(System.in); int num; double num1; System.out.println(" Hello, please tell me a nubmer, and I will square it for you." ); num = keyboard.nextInt(); while ( num <= 0 ) { System.out.println( " Sorry but you can't use that, TRY AGAIN " ); num = keyboard.nextInt(); } num1 = Math.sqrt(num); System.out.println( " The square root would be " + num1 ); } }