Java Program to find Square root of a input number

      No Comments on Java Program to find Square root of a input number
import java.util.Scanner;
class scan
{
	public static void main(String arg[])
	{
		double x,y;
		Scanner kb=new Scanner(System.in);
		System.out.println("Enter Number:-");
		x=kb.nextInt();
		
		y=Math.sqrt(x);

                System.out.println("Square root of a number is: "+y);		
	}
}

OUTPUT:-

Leave a Reply

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