Computer Science, asked by rajsinghjaat753, 5 months ago

State the value and type of each expression.

(i) Math.ceil(6.002)

(ii) Math.max(-10,1.0);

Answers

Answered by dattarajshinde44
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 anindyaadhikari13
1

Answer:-

  1. Math.ceil(6.002)=6.0
  2. Math.max(-10,1.0)=1.0

Note:-

  1. Math.ceil() is used to round the number to the next largest integer.
  2. Math.max() is used to find the largest of two numbers.
Similar questions