round(0.5) - round(-0.5) का नतीजा क्या है?
What is the result of round(0.5) – round(-0.5)?
A)
B)
C)
D)
Explanation:
In programming languages, the round()
function rounds towards the nearest even integer when the value is exactly halfway between two integers (this is known as "bankers' rounding").
So:
round(0.5)
is 0 (rounded to the nearest even integer).round(-0.5)
is also 0 (rounded to the nearest even integer).
Therefore:
0−0=00 - 0 = 0
So, the correct result of round(0.5) - round(-0.5)
is 0.