Can someone please give me a quick code analysis of what is outputted when the method f1(5) is called?
public in f1( int x ) { if ( x == 0 ) return 0; else return f2( x - 2 ); } public in f2( int x ) { if ( x == 1 ) return 1; else return f1( x + 1 ) + x; }


LinkBack URL
About LinkBacks
Reply With Quote
I'm a nooobb.... soo... and well, I'm supposed to be able to do this in my head... So I was wondering if I could get some help seeing the logic behind what is happening in the code..