3:53 pm - Saturday March 24, 2457

Math Example Program for pow(double a,double b)

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044
/**
@AUTHOR: candid java.com
@DESCRIPTION: coding for  get the specified base value raised to the specified power  value
*/
Public class Pow
{
 public static void main(String arg[])
 {
     double d=Math.pow(2,3);  //raised base 2 to the power 3.
     double d1=Math.pow(2.23,3.45);  //raised base 2.23 to the power 3.45
     System.out.println("pow value for d="+d);
     System.out.println("pow value for d1="+d1);
 }
}

OUTPUT:
pow value for d=8.0
pow value for d1=15.909325868265608

BACK

Filed in: Z-A All Java Codes

Comments are closed.