Computer Science, asked by Anonymous, 3 months ago

please help :(
correct Answer = 20 thanks promise​

Attachments:

Anonymous: yah sure please wait for a minute
himanshu2006vps: ok thanks
himanshu2006vps: thank you very much
himanshu2006vps: thank thank you very much
himanshu2006vps: it's enough now stop
Anonymous: :)
Anonymous: thanks for helping today:)
himanshu2006vps: My pleasure to help you and thanks once again for thanking my answer
atrs7391: Thanks for thanking
Anonymous: mention not :)

Answers

Answered by himanshu2006vps
2

Answer:

double x= 6.0

//The Math.ceil() function always rounds a number up to the next largest integer. but ceil( ) does not round negative numbers to larger negative numbers; it rounds them up toward zero.

double y= 15.0

// Math.max finds largest number

//The Java Math rint() method returns a value that is closest to the specified value and is equal to the mathematical integer.

Attachments:

himanshu2006vps: But series programs is difficult a bit
atrs7391: tho the new education policy added coding to cbse and other boards from class 6
himanshu2006vps: yeah I know that
Anonymous: but the only frustrating thing is almost after every 3 years new computer languages are coming
himanshu2006vps: yes
atrs7391: Languages are coming but they are not matured like Java, Python, C++ etc. and this is the reason why people learns the matured languages before new like nowadays everyone learns Java before if they wants to learn Kotlin as the APIs are quite similar
himanshu2006vps: But for hackers, I mean ethical hacker all programming languages are important
himanshu2006vps: for them
himanshu2006vps: programming language like ruby is gaining more popularity
atrs7391: No doubt
Answered by atrs7391
1

Answer:

x = 6.0

y = 15.0

Math.abs - Returns the absolute value of a double value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases:

If the argument is positive zero or negative zero, the result is positive zero.

If the argument is infinite, the result is positive infinity.

If the argument is NaN, the result is NaN.

Params:

a – the argument whose absolute value is to be determined

Returns:

the absolute value of the argument.

Math.ceil - Returns the smallest (closest to negative infinity) double value that is greater than or equal to the argument and is equal to a mathematical integer. Special cases:

If the argument value is already equal to a mathematical integer, then the result is the same as the argument.

If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.

If the argument value is less than zero but greater than -1.0, then the result is negative zero.

Note that the value of Math.ceil(x) is exactly the value of -Math.floor(-x).

Params:

a – a value.

Returns:

the smallest (closest to negative infinity) floating-point value that is greater than or equal to the argument and is equal to a mathematical integer.

Math.rint -Returns the double value that is closest in value to the argument and is equal to a mathematical integer. If two double values that are mathematical integers are equally close, the result is the integer value that is even. Special cases:

If the argument value is already equal to a mathematical integer, then the result is the same as the argument.

If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.

Params:

a – a double value.

Returns:

the closest floating-point value to a that is equal to a mathematical integer.

Math.max - Returns the greater of two double 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. If either value is NaN, then the result is NaN. Unlike the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other negative zero, the result is positive zero.

Params:

a – an argument.

b – another argument.

Returns:

the larger of a and b.


Anonymous: please show work >.
himanshu2006vps: ok wait
Anonymous: thanks!
himanshu2006vps: you can see now
Similar questions