RosettaCodeData/Task/Even-or-odd/XPL0/even-or-odd.xpl0

10 lines
220 B
Plaintext

include c:\cxpl\codes;
int I;
[for I:= -4 to +3 do
[IntOut(0, I);
Text(0, if I&1 then " is odd " else " is even ");
Text(0, if rem(I/2)#0 then "odd" else "even");
CrLf(0);
];
]