RosettaCodeData/Task/Conditional-structures/EasyLang/conditional-structures.easy

9 lines
165 B
Text
Raw Permalink Normal View History

2024-03-06 22:25:12 -08:00
i = randint 10
2023-07-01 11:58:00 -04:00
if i mod 2 = 0
2024-03-06 22:25:12 -08:00
print i & " is divisible by 2"
2023-07-01 11:58:00 -04:00
elif i mod 3 = 0
2024-03-06 22:25:12 -08:00
print i & " is divisible by 3"
2023-07-01 11:58:00 -04:00
else
2024-03-06 22:25:12 -08:00
print i & " is not divisible by 2 or 3"
2023-07-01 11:58:00 -04:00
.