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