0
the program has to accept an integer and in the output, yes to be displayed if the integer uses 3 unique numbers, else no
Example Input/Output 1: Input: 1221255 Output: yes Example Input/Output 2: Input: 1024 Output: no
2 ответов
+ 3
Hint:
* Transform the number into string
* Make a set object out of the string
* Check how many elements contained in the set
* If it counts to three elements exactly, print "yes" otherwise "no"
You can do this, give it a try! 👍
+ 1
Ok,I am trying thanks a lot for the suggestion