1 / 1100%
import static java.lang.Math.*;
public class JavaMathematics {
public static void main(String[] args) {
double x = 28;
double y = 4;
double a = 30;
double b = Math.toRadians(a);
double w = Math.PI;
double z= Math.PI;
System.out.println(w);
System.out.println(z);
System.out.println(Math.abs(x));
System.out.println(Math.abs(y));
System.out.println("Maximum number of x and y is: " +Math.max(x, y));
System.out.println("Minimum number of x and y is: " +Math.min(x, y));
System.out.println(Math.ceil(x));
System.out.println(Math.ceil(y));
System.out.println("Square root of x is: " + Math.sqrt(x));
System.out.println("Square root of y is: " + Math.sqrt(y));
System.out.println(Math.floor(x));
System.out.println(Math.floor(y));
System.out.println("Logarithm of x is: " + Math.log(x));
System.out.println("Logarithm of y is: " + Math.log(y));
System.out.println("exp of a is: " +Math.exp(x));
System.out.println("exp of a is: " +Math.exp(y));
System.out.println("Sine value of a is: " +Math.sin(a));
System.out.println("Tangent value of a is: " +Math.tan(a));
}
}
Powered by TCPDF (www.tcpdf.org)
Students also viewed