Computer Science, asked by sathish2568, 4 months ago

Give the output of the following program segment:

double x = 2.9, y = 2.5;

System.out.println(Math.min(Math.floor(x),y));

System.out.println(Math.max(Math.ceil(x),y));​

Answers

Answered by pranitha2024
11

Answer:

OUTPUT

2.0

3.0

Explanation:

step by step solution......

Math.min(Math.floor(x),y)

Math.min(Math.floor(2.9),2.5)

Math.min(2.0,2.5)

2.0

Math.max(Math.ceil(x),y)

Math.max(Math.ceil(2.9),2.5)

Math.max(3.0,2.5)

3.0

hope it helps you

please mark me as the brainliest

Similar questions