Recursive example ...
It keeps calling itself until we have arrived at something. In PBP you would of course need to exchange the "public int divideBy(int n)" with a label and swap "divideBy(n)" with a goto.Code:public int divideBy(int n) { num = num / n if(num > 0) divideBy(n); }
Trent Jackson




Bookmarks