Code: Select all

```
FOR i=-1 TO 2 STEP 0.5
PRINT i;"is ";
IF Odd(i) THEN PRINT "odd" ELSE PRINT "even or non-integer"
NEXT i
END
'
DEF Odd(n)
'returns 0 if n is non-integer or n is even
'else returnvalue is 1
IF (ABS(n)-INT(ABS(n)))>0 THEN RETURN 0
IF INT(n/2)=n/2 THEN RETURN 0 ELSE RETURN 1
END DEF
```

-1 is odd

-0.5 is even or non-integer

0 is even or non-integer

0.5 is even or non-integer

1 is odd

1.5 is even or non-integer

2 is even or non-integer