Figure 10:
A program counting the number of palindromes of different types and of various lengths. (a) Input, (b) Output.