Create a program that will accept a number from the user and display its square root.

public class SquareRoot
    public static void main(String args[])throws IOException
	   float number;
	   double sqrRoot;
	   InputStreamReader obj=new InputStreamReader(;
	   BufferedReader objectBR=new BufferedReader(obj);
	   System.out.printIn("Enter the Number");
	   String str=objectBR.readLine();
	   System.out.printIn("Square root of"+number+"is"+sqrRoot);

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Show Buttons
Hide Buttons