[Solved] Remove all the repeated characters and print the string with the distinct characters
Distinct Characters: Take a string from the user. Remove all the repeated characters and print the string with the distinct characters. Constraints 1 <= length of the string <= 50 Sample Input 0 aabbbbcccdddeeeefff Sample Output 0 abcdef Approach: The…