# Different Math Class Methods coderinme

#### Different Math Class Methods coderinme

Write Java program to show uses of all Math class methods.
Program:

``````import java.io.*;
public class Q9
{
public static void main(String[] args) throws IOException
{
System.out.print("Enter the value a for all math class: ");
System.out.print("Enter the value of b for max, min, pow: ");
System.out.println(" The value of exponential :"+Math.exp(a));
System.out.println(" The value of pie :"+Math.PI);
System.out.println(" The absolute value of " + a + ":"+Math.abs(a));
System.out.println(" The value of basev :"+Math.E);
System.out.println(" The value of cosine :"+Math.cos(a));
System.out.println(" The value of logrithm :"+Math.log(a));
System.out.println(" The value of maximum :"+Math.max(a,b));
System.out.println(" The value of minimum :"+Math.min(a,b));
System.out.println(" The value of power :"+Math.pow(a,b));
System.out.println(" The value of random :"+Math.random());
System.out.println(" The value of round :"+Math.round(a));
System.out.println(" The value of sin :"+Math.sin(a));
System.out.println(" The value of tan :"+Math.tan(a));
System.out.println(" The value of sqrt :"+Math.sqrt(a));
}
}`````` 