Computer Science, asked by savitasinghbhairopur, 9 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 ıtʑFᴇᴇʟɓᴇãᴛ
78

\mathtt{\huge{\underline{\bf{\red{Question\:?}}}}}

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):

\mathtt{\huge{\underline{\bf{\green{Answer:-}}}}}

Using ; Mathematical Library Methods

The following double x=2.9,y=2.5;

It has the range of low to high near integer .

2.0 - 2.1- 2.2-2.3-2.4-2.5-2.6-2.7-2.8-2.9-3.0

Range upto 2.0 to 3.0

OUTPUT :-

  • 2.0

  • 3.0

_______________________________________


Anonymous: Superb! :claps:
Answered by Anonymous
3

Using ; Mathematical Library Methods

The following double x=2.9,y=2.5;

It has the range of low to high near integer

2.0 - 2.1- 2.2-2.3-2.4-2.5-2.6-2.7-2.8-2.9-3.0

Range upto 2.0 to 3.0

OUTPUT :-

2.0

3.0

HOPE IT HELPS U

PLEASE MARK ME AS BRAINLIST

\huge{\boxed{\boxed{\boxed{\mathfrak{\blue{HUMU0807❥}}}}}}

Similar questions