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

which metric unit we use to measure ink in a pen
Abby wants to save $75 for a trip to the city. If she has saved $48 so far, what percentage of her goal has she saved?
Which statement BEST compares the climates of the two locations shown on the map? A)Location 2 is warmer and drier than location B)Location 2 is warmer and more
3. The girl picked the flowers. *10 poina. The flowers is picked by the girl.b. The flowers are picked by the girl.c. The flowers was picked by the girl.d. The
rate of change and initial value for y=1/2+2
Consider functions f and g. What is the approximate solution to the equation f(x)=g(x) after three iterations of successive approximations? Use the graph as a s
What does Jill see inside the house when she looks through the window before entering?
For P = {1, 6, 10, 14}, Q = {1, 5, 11), and R = {3, 5, 10, 11), find P U (Q U R). The answer is { } (Use a comma to separate answers as needed.)
Polygon A is the result of reflecting Polygon B over the line y = 2. Explain how you know that the two polygons are congruent. Answer using complete sentences.
Let f(x) = -4x + 7 and g(x) = 2x - 6. Find. (gxf)(1)