flag = value; } } now I want to indent 4 spaces for each level of recursion the output lines so the output would look like this entering sumSqaures(5) entering sunSquares(4) entering sumsqaures(3) entering sumSquares(2)
sorry it didn't show the proper output: each entering sumSquares line should be indented 4 spaces the second line, 8 spaces the third line, and 12 spaces the fourth line
Just write a for loop that uses your 'count' variable as a stopping point to append spaces to a string, then stick that string on the beginning of your print statements. You need to pass ++count or count+1 instead of count++ though, because right now your program is just passing 0s in each call. [ July 31, 2004: Message edited by: Darin Niard ]
I like your apparent taste in music, "Bix", but I think you need to take a look at our display name policy and please edit your display name to follow that policy. Thanks. [ July 31, 2004: Message edited by: Jim Yingst ]
Thanks that makes since, and if I knew what code tags were I would use them. As for the name, that is my real true first name, no joke. Bix "Bismark" Beiderbecke is my great great uncle, I apologize for any confusement.
When you post next time, look under the edit box. Just below the "Add Reply" button you see "smilies" and Instant UBB Code buttons. One of the buttons is a "code" tag which puts [ code ] tags into your post. If you put your own code between those tags, the formatting of that code is preserved, usually making it easier to read.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
No $#!%?!!! Cool. Carry on then. I will replay a compilation of your great great uncle's work, in his honor. Cheers... [ July 31, 2004: Message edited by: Jim Yingst ]