class FatorialDemo {
public int fatorial (int n){
if (n==1) {
return 1;
}
/* Definicao recursiva, invoca a si mesmo */
return fatorial(n-1)*n;
}
public static void main(String args[]) {
FatorialDemo teste = new FatorialDemo();
System.out.println(teste.fatorial(5));
}
}
Este artigo foi útil ?
SimNão
Last modified: 11 de outubro de 2011
Jili178casino, now we’re talking! Time to hit the tables or spin the reels. Big wins incoming! What are you waiting for? Sign up here jili178casino
500jlcasino has been a steady experience. Offers many perks to new players. You can join up over at 500jlcasino.
Stargame, yeah? Seems like a solid option. Pretty standard fare, but hey, sometimes that’s all you need. If you ain’t got anything else going on, stargame might just scratch that itch.