Design a program with an algorithm that will take a string from the user and then decide if each character in that string is unique. For example, if you ask the user to enter a string and that user enters the world ‘hello’, the result of the algorithm implementedshould return ‘false’ or ‘not unique’. If the user enters a string such as the word ‘phone’ the program will return ‘true’ or ‘unique’ since every character in the word phone is unique and is not repeated. An example of this program follows: Output should show as : enter a string rizma This string has all the unique characters would u like to continue?(y for yes n for no) y Enter a string waali This string is not unique
Design a
Output should show as :
enter a string
rizma
This string has all the unique characters
would u like to continue?(y for yes n for no)
y
Enter a string
waali
This string is not unique
Your code should work for all strings and essentially all characters, as many examples will be tested.
Step by step
Solved in 2 steps