I'll show you a string abbreviation problem. Words longer than 10 characters should be shortened: keep the first letter, replace the middle with the count of omitted letters, keep the last letter.
For example, "internationalization" becomes "i18n" because there are 18 letters between 'i' and 'n'. You'll process multiple words, so you need a loop. For each word, check its length and decide whether to abbreviate or print as-is.