Skip to content

Instantly share code, notes, and snippets.

@feehe21
Created September 27, 2018 12:31
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 feehe21/0b47dd0c5d29f3edc62551d96d434ccc to your computer and use it in GitHub Desktop.
Save feehe21/0b47dd0c5d29f3edc62551d96d434ccc to your computer and use it in GitHub Desktop.
/**
* 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