[Solved] : Question 13260

how do i go about writting this program it says here, write a program that displays the folloing menu:
1. input a word
2. display all susbstrings
3. display all permutations
4. Exit

a user can not choose options 2 & 3 without first choosing option 1

include a function called Substrings that prints all substrings, sorted by length, e.g if the user inputs “rum”, the program prints :
r
u
m
ru
um
rum

include a function called permutations that displays all possible permutations of a given input string –if the string contains duplicate characters, you may have multiple repeated results.

e.g : If the input is cat

Output:
cat
cta
act
atc
tac
tca

either string or characters or both datatypes can be used in your solution.try to make its work for a sentence as well .plz help


Expert Answer


Answer to : Question 13260

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?