Computer Science, asked by karmveersingh4007, 8 days ago

Give the output of following : [4] (i) Math.abs(-9.99) (iii) Math.sqrt(Math.max(9,7)) (ii) Math.pow(4,Math.cbrt(27)) (iv) Math.ceil(-4.3)​

Answers

Answered by TheUntrustworthy
2

Output of the following:

(i) Math.abs(-9.99)

9.99

(ii) Math.pow(4,Math.cbrt(27))

64

(iii) Math.sqrt(Math.max(9,7))

3

(iv) Math.ceil(-4.3)

-4

Answered by CopyThat
3

Outputs:

(i) Math.abs(-9.99)

  • 9.99

Math.abs() returns the absolute value of a number ignoring the sign (positive, negative)

(ii) Math.sqrt(Math.max(9,7)

  • Math.sqrt(9)
  • 3

Math.max() returns the highest/max value between two numbers.

Math.sqrt() returns the square root of a number.

(iii) Math.pow(4,Math.cbrt(27))

  • 64

Math.pow() returns the power of number, like 2³, 3³.

Math.cbrt() returns the cube root a number

(iv) Math.ceil(-4.3)

  • -5

Math.ceil() returns higher integer for the given argument.

Math.floor() returns the lower integer for the given argument.

Similar questions