christianbabona christianbabona
  • 19-03-2017
  • Computers and Technology
contestada

If num is an int which expression always evaluates to true if num holds an odd number

1) Num%2==0
2)Num%2 <0
3)Num%2==1
4)Num/2==1

Respuesta :

xjkbel
xjkbel xjkbel
  • 20-03-2017

The answer is 2) Num%2==1.
The modulus operator (%) divides the left hand side by the right hand side and returns the remainder.

Examples:
3%2=1 : 2 goes into 3 once, with 1 remaining.

5%2 =1 :  2 goes into 5 twice, with 1 remaining.

11%2 =1 :  2 goes into 11 five times, with 1 remaining.

Answer Link

Otras preguntas

solve each system by graphing y=-4/9x-3 y=-7/5x-3
How do compression stockings work
How is the role of prophet different in Islam than in other religions?
what is the percent increase from $5 to $8
which geographic factor enabled the German blitzkrieg to succeed?
enter the value of p so the expression 5/6 - 1/3n equivalent to p(5-2n)
y = 10 x = 3 x + y + y + 17 + y = ? Thanks!!
Who was the frist person alive
What did interactions with foreign groups bring to ancient civilizations?
What number is 45%of 180?