Could you please share your code so one can have a look?
The base idea is really simple (see pseudo code below): you keep calling the same function from itself as long as you haven't reached the maximum (n) every time increasing the current element (where we started from).
function printNaturalNumber(start, end)
if start < end
print(start)
if (start <= end)
printNaturalNumber(start + 1, end)
and this function would be called like
printNaturalNumber(1, n)