Computer Science, asked by Alwin7087, 5 months ago

Q3. Solve the following: [2]
a) i.Math.pow(16, 0.25)
ii.Math.ceil(4.002)

Answers

Answered by anindyaadhikari13
6

Solution:

To solve this, we have to know about the functions used here.

1) Math.pow(x, y): It has two parameters x and y. This function returns the value of x raised to the power y. The return type is always double.

2) Math.ceil(x): This function returns the next higher number. If x is an integer, the return type is integer otherwise double.

> Math.pow(16, 0.25) is same as 16 raised to the power 1/4

= 2.0

Math.ceil(4.002) returns the next number which is 5.0. Since it is in double, the output is also double.

Answer:

  • 2.0
  • 5.0
Similar questions