In this program, we will take a string as input and find the smallest and largest word in a given string
Steps to solve the program
- Take a string as input.
- Split the string using Split().
- Find the smallest and the largest word from a string using min() and max().
Output :