Skip to content

Instantly share code, notes, and snippets.

@gmfc
Created May 16, 2013 11:05
Show Gist options
  • Select an option

  • Save gmfc/5590965 to your computer and use it in GitHub Desktop.

Select an option

Save gmfc/5590965 to your computer and use it in GitHub Desktop.
Função que calcula fatorial
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