System.out.println(Math.sqrt(5+Math.min(59,84)); the output is?
Answers
Answered by
3
- The output of the given code is 8.0
Given expression,
> Math.sqrt(5 + Math.min(59, 84))
= Math.sqrt(5 + 59) [Math.min() returns the minimum value among two numbers]
= Math.sqrt(64)
As Math.sqrt() returns the square root of a number, we get,
= 8.0
The value is now displayed on the screen.
Resultant Data Type: Double.
Some important math functions:
- Math.min(): Returns minimum value among two numbers.
- Math.max(): Returns the maximum among two numbers.
- Math.pow(): Returns a number raised to the power another number.
- Math.sqrt(): Returns square root of a positive number.
- Math.cbrt(): Returns cube root of any number.
- Math.log(): Returns natural logarithmic value of a positive number.
Answered by
1
Answer:
The answer will be 8.0
Similar questions