var i = 28;
if ( i / 2 % 2 > 0 ) {
document.write("The number is an odd integer");
}
else {
document.write("The number is an even integer");
}
What is displayed when the code segment above is executed?
a.Nothing is printed. The result of the computation is equal to 0.
b..The number is an odd integer.
c.Nothing is printed. There is a runtime error.
d.The number is an even integer.
SOLUTION -
Correct answer is "(d) The number is an even integer. "
First given i = 28 s0,
if( 28/2 = 14 % 2 = 0 > 0 ) it false so it will print else part .
IF YOU HAVE ANY DOUBT PLEASE COMMENT DOWN BELOW I
WILL SOLVE IT FOR YOU:)
----------------PLEASE RATE THE ANSWER-----------THANK
YOU!!!!!!!!----------
Get Answers For Free
Most questions answered within 1 hours.