Created
September 27, 2018 12:31
-
-
Save feehe21/0b47dd0c5d29f3edc62551d96d434ccc to your computer and use it in GitHub Desktop.
This file contains 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
/** | |
* Write a description of class recursive here. | |
* | |
* @author (your name) | |
* @version (a version number or a date) | |
*/ | |
public class recursive | |
{ | |
public recursive() | |
{ | |
// initialise instance variables | |
recur(0,1); | |
} | |
public void recur(int x, int y){ | |
if(y<100){ | |
System.out.println(y); | |
y = x+y; | |
x = y-x; | |
recur(x,y); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment