brittneyaxel3011 brittneyaxel3011
  • 09-06-2019
  • Computers and Technology
contestada

Write an expression that evaluates to true if the integer variable x contains an even value, and false if it contains an odd value

Respuesta :

jcherry99
jcherry99 jcherry99
  • 09-06-2019

Answer:

Explanation:

I don't know what language you use, but mod is a common command in almost all of them. You could write it like this

for x = 1 to 10 do begin

 if x mod 2 = 0 then print x " is even."

 id x mod 2 = 1 then print x  " is odd."

end;

Answer Link

Otras preguntas

Hey can you please help me posted picture of question
Carlos usually spends a lot of time surfing. he values the time he has in the ocean alone with his thoughts and the waves. it's something he really feels like h
Which claim is supported by significant scientific research?A. There is no reason to believe humans are causing recent global warming.B. Weather anomalies can b
What are two images from Marlowe’'s poem? …thee beds of roses… …shepherds feed their flocks… Fair lined slippers… Come live with me…
Match the time period with Sophie's description of her schoolwork. 1. present hopes will be easy, but doubts it 2. last year not so difficult 3. future a
The leading cause of motor vehicle accidents is _____. 1.inexperience 2.distraction 3.alcohol consumption 4.road hazards
Can someone help me?!
Which substance yields hydroxide ion as the only negative ion in aqueous solution?
How does the poem Hatred use personification in lines 21-28 to contrast hatred with compassion, brotherhood, and doubt?
Label the map to show how the northwest ordinance regulated slavery.