RosettaCodeData/Task/Conditional-structures/Maple/conditional-structures-2.maple

8 lines
94 B
Plaintext

if x = 0 then
res := y;
elif y = 0 then
res := x;
else
res := sqrt(x^2+y^2);
end if;