RosettaCodeData/Task/Conditional-structures/Julia/conditional-structures-1.julia

19 lines
291 B
Plaintext

function test(x, y)
if x < y
println("x is less than y")
elseif x > y
println("x is greater than y")
else
println("x is equal to y")
end
end
julia> test(1, 2)
x is less than y
julia> test(2, 1)
x is greater than y
julia> test(1, 1)
x is equal to y