Tuesday, November 22, 2016

Mencari Angka Exponesial

Kodenya

public class FindExponentialNumberExample {

  public static void main(String[] args)
  {
       /*
     * To find exponential value of a number, use
     * static double exp(double d) method of Java Math class.
     *
     * It returns e raised to argument value.
     */
 
     System.out.println("Exponential of 2 is : " + Math.exp(2));
  }
}

Hasilnya


No comments:

Post a Comment