// Program to print the square root of first N integers. // Written 2002 by Wayne Pollock, Tampa Florida USA. class SqRoots { static final int N = 10; // How many square roots to compute. public static void main ( String [] args ) { // Display a title System.out.println( "\n Square Root Table" ); System.out.println( "-------------------" ); for ( int i = 1; i <= N; ++i ) { // Compute and display square root of i System.out.println( " " + i + ":\t" + Math.sqrt( i ) ); } } }