What value will Math.sqrt(Math.ceil(15.3)) return?

ICSE Class 10 Computer Applications PYQ · 2023 Paper · Section A

1(v)1 Mark · 2023 · Section A · 2023 Paper

What value will Math.sqrt(Math.ceil(15.3)) return?

Show SolutionHide Solution↓

4.0

Reason — Math.ceil method returns the smallest double value that is greater than or equal to the argument and Math.sqrt method returns the square root of its argument as a double value. Thus the given expression is evaluated as follows:

Math.sqrt(Math.ceil (15.3))
= Math.sqrt(16.0)
= 4.0

← Previous questionNext question →

Browse the free Computer Applications sample bank