/* In Class exercise: 02/25/2016 * You are required to use a for loop to read in 10 numbers and print their square roots. * Print the square root immediately after obtaining the number. You are not required to store it anywhere. */ import java.util.Scanner; class SquareRoots { public static void main(String [] args) { double num=0; // Decalre a double variable. Give it a dummy value, say 0 Scanner input = new Scanner (System.in); for(int i=0;i<10;i++) //This loop runs 10 times { num = input.nextDouble(); // read in the number System.out.println(Math.sqrt(num)); //print its square root } } }