Computer Science, asked by pujamahi2326, 5 months ago

double x=2.7:
System.out.println(Math.floor(x));​

Answers

Answered by niharikasharma6399
0

Answer:

2

Explanation:

floor function rounds downs the nearest integer.

it returns the largest integer that is smaller than or equal to x.

Example-

2.7 becomes 2

3.2 becomes 3

-2.1 becomes -3

5.9 becomes 5

Similar questions