Give the output of the following: [2]
(a) Math.ceil(3.4) + Math.pow(2, 3);
(i) double b= −15.6; double a=Math.rint(Math.abs(b)); System.out.println(“a=” +a);
Answers
Answered by
2
Answer:
Explanation:
Math.floor method returns the largest double value that is less than or equal to the argument and is equal to a mathematical integer. As -5.0 is the largest mathematical integer less than -4.7 so it is the output. Note that -4.7 is a negative number so the largest integer less than -4.7 is -5.0 and not -4.0.
Similar questions
English,
4 months ago
Psychology,
4 months ago
Social Sciences,
4 months ago
English,
8 months ago
Social Sciences,
8 months ago
Psychology,
11 months ago
India Languages,
11 months ago
Math,
11 months ago