Created
May 6, 2020 18:35
-
-
Save pppillai/0c63cb08ab9205e6a20c79abb37b9455 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(first). | |
-export([double/1, mult/2, area/3, squareValue/1, tripleValue/1]). | |
mult(X, Y) -> | |
X * Y. | |
double(X) -> | |
mult(X, 2). | |
area(A, B, C) -> | |
S = (A + B + C)/2, | |
math:sqrt(S*(S-A)*(S-B)*(S-C)). | |
squareValue(X) -> | |
math:pow(X, 2). | |
tripleValue(X) -> | |
squareValue(X) * X. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment