I have to Prompt the user to enter his/her name and Print all combinations of three letters from the name. How to write script for this?
Once you have read the user name, you need to split te name in letters. Decide how to store the different letters (tmpfile, array, ..) Then loop through the letters: Dirty: a lot of nested loops for (letter1) / for (letter2) / .. / for (maxlength) Difficult 1: use while loop Difficult 2: use ecursive function
Alternative: Generate all 3-letter combi and make a check function for filtering these combi to your result.
Advanced: use different approaches and compare.