RosettaCodeData/Task/Logical-operations/Crystal/logical-operations.cr
2026-04-30 12:34:36 -04:00

7 lines
194 B
Crystal

def show_logical_ops (a, b)
printf "%-5s && %-5s -> %s\n", a, b, a && b
printf "%-5s || %-5s -> %s\n", a, b, a || b
printf "!%-5s -> %s\n", a, !a
end
show_logical_ops false, true