The program must accept an integer N as the input. The program must print yes if exactly three digits are used to form the integer N. Else the program must print no as the output.The program must accept N string values and sort them. Then the program must print the first and the last string values.
Input :
1221255
Output :
yes
Explanation:
Here the integer 1221255 is formed using exactly three digits 1, 2 and 5.
Hence the output is yes
Here are the various methods and logic.
C++ :

Python :






C :


Leave a Reply