Question: 7. (20 points) Write a C++ program called all subsets.cpp which displays all subsets of a set. In the problem, your program should read n

 7. (20 points) Write a C++ program called all subsets.cpp whichdisplays all subsets of a set. In the problem, your program should

7. (20 points) Write a C++ program called all subsets.cpp which displays all subsets of a set. In the problem, your program should read n characters from a user and display all subsets of the characters. In the program, you can assume that the number of input characters is less than or equal to 15. Your program should ask a user to enter the number of input characters. After that, it should read the characters. For the problem, you can assume that the input characters are always distinct. Test case 1 Number of input characters: 1 Enter 1 characters: a ===== All Subsets ===== empty {a} Test case 2 Number of input characters: 2 Enter 2 characters: st ===== All Subsets ===== empty {5} {t} {s,t} Test case 3 Number of input characters: 3 Enter 3 characters: cba ===== All Subsets ===== empty {a} {b} {c} {a,b} {b,c} {a,c} {a,b,c} Test case 4 Number of input characters: 4 Enter 4 characters: V x y z Page 3 of 4 ===== All Subsets ===== empty {v} {x} {y} {v,X,Y,Z} Test case 5 Number of input characters: 10 Enter 10 characters: abcdefghij ===== All Subsets ===== empty {a} {b} {c} {a,b,c, d, e, f, g, h, i, j}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!