Traverse binary tree with recursion and number of nodes

Is there a way to print out numbers for pre-order, post-order and in-order traversals of trees using just recursion and a number. The trees are binary and n is the number of nodes from the parent to al children. Can anyone help me write the function to print the numbers in their orderly fashion in any programming language?