Advertisement
akosiraff

Recursive Loop Counter

Jun 12th, 2014
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1.  
  2. Download: http://solutionzip.com/downloads/recursive-loop-counter/
  3. Design and implement a recursive function that performs the same task as
  4. a loop counter. This function will have a void return type and
  5. two parameters. One parameter holds the initial value of the counter variable
  6. and is incremented on each recursive call. The other parameter holds a limit,
  7. specifying the number of desired iterations plus one. The base case occurs
  8. when the counter variable is equal to the limit. In the general case, print
  9. out the counter value. Display a message indicating the loop is finished when
  10. the base case is reached. Test your function with a simple calling program.
  11. Download: http://solutionzip.com/downloads/recursive-loop-counter/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement