Created
July 18, 2013 00:19
-
-
Save gusthavosouza/6025750 to your computer and use it in GitHub Desktop.
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
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