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

What is 3/7÷2/7 Also 3/4÷5/6
can someone help me with this
What is the purpose of an exchange rate? to determine how many trade barriers are needed to determine how much one currency is worth compared to another to dete
Search up “ An Animated Story of a boy who dislikes his dog” on Yt. Watch the video. Write a short summary of the video
trình bày quá trình chuyển hóa glucid và sự phân bố đường sau ăn ?
Chapter 6: The Time Traveller, while walking around and observing the future, notices that Group of answer choices there are no signs of architecture. the human
The image shows the linear graph for a family that hired a babysitter for a day. The family gave the babysitter some money up front to buy herself some lunch, a
Why did Ralphie have to stop after every block on his way to the library? He was delivering newspapers. B The chain kept coming off his bike. C His handlebars w
Did slaves receive medical care
which type of rock is made of tiny bits of animal shells?