Last active
September 15, 2019 19:03
-
-
Save Pharaoh00/8f97956ae5acbbbeb204e15bfb89fa2b 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
float factRecursiva(int num){ | |
if(num == 0){ | |
return 1; | |
} | |
else { | |
return num * factRecursiva(num - 1); | |
} | |
} | |
float cosAprox(int num){ | |
if(num == 0){ | |
return 1; | |
} | |
else { | |
return cosAprox(num-1) + pow(-1,num)*(1/factRecursiva(2*num)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment