8 solutions available
Question 1Distinguish between Math.ceil() and Math.floor() methods.
Question 2Explain the following Math functions in Java:i. Math.sqrt()
Question 3Write the following as Java expressions:i. ∣x3−y2−2xy∣\lvert x^3 - y^2 -2xy\rvert∣x3−y2−2xy∣
Question 4Write valid statements for the following in Java:i. Print the rounded off value of 234.49
Question 5Write a program in Java to find the minimum of three numbers using Math.min() method.
Question 6Write a program to print:i. p to the power qii. the square root of pThe values of p and q are 64 and 2 respectively.
Question 7Write a program to generate random integers in the range 10 to 20.
Question 8Write the equivalent Java statements for the following, only using the mathematical functions:i. Print the positive value of -101.