RosettaCodeData/Task/Even-or-odd/SenseTalk/even-or-odd.sensetalk
2023-07-01 13:44:08 -04:00

10 lines
387 B
Text

set num to random of 100 -- start with a random number from 1 to 100
// use the 'is a' operator to test the value
if num is an odd number then put num & " is odd"
// see if num is divisible by 2
if num is divisible by 2 then put num & " is even (is divisible by 2)"
// check to see if the remainder is 0 when dividing by 2
if num rem 2 is 0 then put num & " is even (zero remainder)"