Compare length of two strings: Difference between revisions

Line 357:
</syntaxhighlight>
{{out}}
The user enters a list of up to 10 strings
./compare_lengths Like sands through the hourglass these are the days of our lives
<pre>
Capture the string 1 (up to 10, Enter to finish)? abcd
9: hourglass
Capture the string 2 (up to 10, Enter to finish)? 123456789
7: through
Capture the string 3 (up to 10, Enter to finish)? abcdef
5: lives
Capture the string 4 (up to 10, Enter to finish)? 1234567
5: sands
Capture the string 4 (up to 10, Enter to finish)?
5: these
 
4: days
You entered 4 strings. Lengths are as follows:
4: Like
1. 123456789: 9 chars.
3: are
2. 1234567: 7 chars.
3: our
3. abcdef: 6 chars.
3: the
4. abcd: 4 chars.
3: the
 
2: of
End of program execution.
</pre>
 
58

edits