State the value and type of each expression.
(i) Math.ceil(6.002)
(ii) Math.max(-10,1.0);
Answers
Answered by
0
Answer:
i)6
ii)1.0
Explanation:
The Math. ceil() function always rounds a number up to the next largest integer.
max(int a, int b) returns the greater of two int values. That is, the result is the argument closer to positive infinity. If the arguments have the same value, the result is that same value.
Answered by
1
Answer:-
- Math.ceil(6.002)=6.0
- Math.max(-10,1.0)=1.0
Note:-
- Math.ceil() is used to round the number to the next largest integer.
- Math.max() is used to find the largest of two numbers.
Similar questions
Accountancy,
2 months ago
India Languages,
2 months ago
Math,
2 months ago
Math,
5 months ago
Math,
5 months ago
Economy,
10 months ago
Math,
10 months ago
English,
10 months ago