Computer Applications
Write down the syntax for the following functions in Java programming:
(a) To find the smaller between two numbers.
(b) To find the absolute value of a number.
(c) To find the exponent of a number.
(d) To find the square root of a number.
Values & Data Types Java
83 Likes
Answer
(a) To find the smaller between two numbers.
Math.min(a, b)
(b) To find the absolute value of a number.
Math.abs(a)
(c) To find the exponent of a number.
Math.exp(a)
(d) To find the square root of a number.
Math.sqrt(a)
Answered By
43 Likes