Skip to content

Instantly share code, notes, and snippets.

@gusthavosouza
Created July 18, 2013 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gusthavosouza/6025750 to your computer and use it in GitHub Desktop.
Save gusthavosouza/6025750 to your computer and use it in GitHub Desktop.
public class Recursao{
public static void main(String args[]){
metodo_recursivo(0);
}
public static void metodo_recursivo(int n){
if(n == 1001)
return;
System.out.println(n % 100 == 0 ? "print" : n);
metodo_recursivo(n+1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment