10th ICSE Java Programs – Java Program to find the Square Root of a number using Library Functions

10th ICSE Java Programs – Java Program to find the Square Root of a number using Library Functions

class libfn

{

public static void main(String args[])

{

int val;

val=2;

double res=Math.sqrt(val);

System.out.println(” Square root of ” + val + ” is : ” + res);

}

}

Leave a Reply

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

Security Code: