Code :
class SquareRoot
{
public static void main(String args[])
{
double x = 5; // Declaration and initialization
double y; // Simple declaration
y = Math.sqrt(x);
System.out.println("y = " + y);
}
}
Output :
Code :
class SquareRoot
{
public static void main(String args[])
{
double x = 5; // Declaration and initialization
double y; // Simple declaration
y = Math.sqrt(x);
System.out.println("y = " + y);
}
}
Output :
0 Comments