Program 3 – Rising Runs
A “run” is a sequence of letters that are all identical. A string can contain many runs. The
shortest run has length one. The longest possible run is the entire string. Here’s a string with 3
runs: AA7777CCC. The lengths of the runs are 2, 4, and 3, respectively.
Write a function called ‘rising_runs(s)’ that accepts a string, s, containing one or more runs. The
function should examine the runs in s and it should display ‘is rising’ if the lengths of the runs
don’t decrease in length. So, 3, 3, 7, 9 is a rising collection, while 3, 3, 9, 7 is not. The function
should display ‘is not rising’ in this case.
Write a main driver that repeatedly asks the user to enter a string containing runs until the user
enters a run of length zero. The characters in the string can be any character at all –
alphabetics, numerics, punctuation, whatever. If you wish you may assume that no run will be
longer than 9 in length if it helps you.
Run your program several times using different inputs – sufficient to demonstrate that your
program meets all the assignment requirements. Capture a screen shot of each run and paste
them into an MS Word document. Place a caption above each image.