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

8 lines
94 B
Text
Raw Permalink Normal View History

2014-04-02 16:56:35 +00:00
if x = 0 then
res := y;
elif y = 0 then
res := x;
else
res := sqrt(x^2+y^2);
end if;