Subset (DFS)
Problem Given a natural number N, write a program that prints all subsets of a set with elements 1 through N. input The first line is given a natural number N (1<=N<=10). output From the first line, the subsets are printed in the same order as in the output example below, one for each line However…