Created
May 16, 2013 11:05
-
-
Save gmfc/5590965 to your computer and use it in GitHub Desktop.
Função que calcula fatorial
This file contains hidden or 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
| clss fatorial{ | |
| public static void main(String args[]){ | |
| System.out.println(fat(10)); | |
| } | |
| public static double fat(double n){ | |
| n==0?1:n*fat(n-1); | |
| return n; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment