Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -module(second).
- -export([hypotenuse/2, perimeter/2, area/2]).
- hypotenuse(X,Y) ->
- A = first:square(X),
- B = first:square(Y),
- math:sqrt(A + B).
- perimeter(X,Y) ->
- H = second:hypotenuse(X, Y),
- X + Y + H.
- area(X, Y) ->
- (X * Y) / 2.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement