How do you write a recursive algorithm for finding all the subsets of a given number:

i.e if 2 is entered it should give

1,2,12

and if it is 3

1,2,3,12,13,23,123

It has to be recursive and has you are allowed to use only 1 iteration. I know how do do this non-recursively but I'm not sure how to do it recursively.

BTW this is a console application.

Thanks for your help!