Answer:
Step-by-step 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;