All pastes #454433 Raw Edit

Stuff

public text v1 · immutable
·published 2007-04-23 16:42 UTC
rendered paste body
/* This

*/

import java.text.*;
import java.io.*;
public class Roots  {

       //define method
       public static void main(String [] args)throws Exception  {
                                                                  	
      
      //Declares variables
      int k;                                                       //integer van een getal
      double square;                                               //kwadraat van het getal
      double root;                                                 //wortel van het getal
      String str;
      
      BufferedReader in1 = new BufferedReader (
       new InputStreamReader(System.in));
      
      

      //While Loop to calculate and print the squares and roots
      k = 0;
      while ( k <= 50)  {
            square = k*k;
            root = Math.sqrt(k);
            k++;
            System.out.println(k + " " + square);
            str = in1.readLine();

      }

	  System.in.read();

        }}
      
      //Calculate the result
      
      
      //Tell user the answer