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(A)-> % obtain the square of a number
- mult(A,A).
- treble(A)-> % obtain the triple of a number
- mult(3,A).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement