Created
May 6, 2020 14:16
-
-
Save Joakineee/a21e91458451e5c99177dcf69a1ca814 to your computer and use it in GitHub Desktop.
My first Erlang program
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(second). | |
-export([hypotenuse/2,perimeter/2,area/2]). | |
hypotenuse(X,Y) -> | |
math:sqrt(first:square(X) + first:square(Y)). | |
perimeter(X,Y) -> | |
X + Y + hypotenuse(X,Y). | |
area(X,Y) -> | |
first:area(X,Y,hypotenuse(X,Y)). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Excellent!