
Sequence of letters
Modify the previous program so that it reads a sequence of lower case letters (separated by white space or new line) from standard input. The reading stops when the input letter is less (comes before in the alphabet) than the previously read letter. The program prints the length of the non-decreasing sequence read and the greatest difference between consecutive letters.
Example
a b
e g f
Length: 4
Greatest difference: 3