Give the output of the following expressions. [2] i) Math.sqrt(Math.floor(16.79)); ii) Math .max(Math.ceil(3.24),4);
Answers
i)Math.sqrt(Math.floor(16.79)); - The output of the given expressiion is 4.
ii) Math .max(Math.ceil(3.24),4);- The output of the following expression is 4.
Explanation:
i)Math.sqrt(Math.floor(16.79));
- Math.floor(16.79), math.floor() function will return the integer value of the given value. this function will provide the integer value 16 for 16.79
- Math.sqrt(16) will return the square root of the expression in it. So, the output for the first expression is 4.
ii) Math .max(Math.ceil(3.24),4);
- math.ceil() function returns the nearest round-off value of the decimal value. Therefore, the output for math.ceil(3.24, 4) will be (3,4).
- math.max() function returns the maximum value from the given list of expressions. Hence, the output for math.ceil(3,4) will be 4.
Math.sqrt(Math.floor(16.79)) = 4 and Math .max(Math.ceil(3.24),4) = 4
i) Math.sqrt(Math.floor(16.79))
First solving function inside bracket
Math.floor(16.79)
floor function return the number to the lower greatest integers
hence Math.floor(16.79) = 16
Math.sqrt(16)
Sqrt function return the positive square root.
Math.sqrt(16) = 4
Hence Math.sqrt(Math.floor(16.79)) = 4
ii) Math .max(Math.ceil(3.24),4)
First solving function inside bracket
Math.ceil(3.24)
ceil function return the number to the higher lowest integer
hence Math.ceil(3.24) = 4
Math.max(4,4)
max function return the maximum of the given values
Here both values are same , hence will return 4
Math.max(4,4) = 4
Hence Math .max(Math.ceil(3.24),4) = 4
Learn More:
(e) What will the following functions return when executed:(i) Math ...
https://brainly.in/question/19891245
i am located near top of the excel window, below the quick access ...
brainly.in/question/11521467
Excel would evaluate the formula, = 20*10/5*8 and return this ...
brainly.in/question/14112243