Java Program to find square root and power, Write a java program that finds square root and power
Program
class powsq
{
public static void main(String args[])
{
int i=Integer.parseInt(args[0]);
int j=Integer.parseInt(args[1]);
double sq=Math.sqrt(i);
double pw=Math.pow(i,j);
System.out.println("Square root is:"+sq);
System.out.println("Power is:"+pw);
}
}
No comments:
Post a Comment