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

Respuesta :

xjkbel
xjkbel xjkbel
  • 20-03-2017

num%2==1

The modulo operator (%) divides the left hand side by the right hand side and returns the remainder. When dividing an odd number by 2 there will always be a remainder of 1.

Answer Link

Otras preguntas

i need help wiht math
Liquid octane will react with gaseous oxygen to produce gaseous carbon dioxide and gaseous water . Suppose 1.1 g of octane is mixed with 1.04 g of oxygen. Calcu
What is true about an atom when it is neutral? There may be more than one answer. Group of answer choices It has the same number of protons and electrons It has
Which expression is equivalent to 9 + 0.5y – y - 0.5 ? 9 - y -0.5y – 9.5 -0.5y + 8.5 0.5y + 8.5
Write an equation of the line in slope-intercept form.
You upload photos and videos to a social media website. The ratio of photos to videos is 20 : 1. You upload 3 videos. How many photos do you upload?
Please I need the answer
Which sentence is punctuated correctly? The author noted "The grass was dry and brittle. (page 32)" He writes, "Water your grass before 10 AM;" he lists several
Read this excerpt from a story. Miya took a deep breath, squared her shoulders, and entered the kitchen. "Hey, Mom. What's up?" "Not much. I'm just paying some
Miguel drives 295 miles in 5 hours. How many miles does Miguel drive in 7 hours? *