Advertisements
Advertisements
Question
What is the output of the statement? Math.pow (36, 6/5);
Options
36.0
1.0
73.71
6.0
MCQ
Advertisements
Solution
36.0
Explanation:
In the expression Math.pow(36, 6/5), the division 6/5 is evaluated first using integer division, yielding 1 instead of 1.2. Hence, the expression simplifies to Math.pow(36, 1), which returns 36.0 because the pow() method produces a double value.
shaalaa.com
Is there an error in this question or solution?
