[Solved] Converting an iterative algorithm to a recursive one [closed]
This is almost the same as BLUEPIXY‘s answer since I believe it’s the straight forward solution, but since you are confused by the function pointer, I removed that. #include <stdio.h> #include <stdlib.h> void printValue() { static unsigned int y; printf(“%d\n”, y); y += 1; } void recursiveFunction(int counter) { printValue(); if (–counter == 0) return; … Read more