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

75 is 10 less than 85 what is the answer
There are 18 bikes in the rack. There are 4 more blue bikes than yellow bikes and 2 less yellow bikes than green bikes. How many bikes of each color are in the
Luz earns $400 for 40 hours of work. Use a ratio table to determine how much she earns for 6 hours of work.
_______ is the instructions for making a cells ________.
What can be considered a characteristic of the first Native Americans that Christopher Columbus encountered? A.) friendly B.) warlike C.) cannibalistic D.) mode
A chloride dissolves in water to form a colored solution. The chloride could be (1) HCl (2)KCl (3)CaCl2 (4)NiCl2
Can someone please explain to me what should I do? Thank you!
• Won the presidential election of 1828 • Was seen as a "common man" and represented the expansion of democracy • Filled government positions with people from h
True Or False The State of the Union address is important because it only addresses the strengths and successes of the previous years.
x-3y=6 into slope intercept form. using y=mx+b