Palindromic gapful numbers | Rosetta Code | #19
URL to the problem page: http://rosettacode.org/wiki/Palindromic_gapful_numbers Numbers that are (evenly) divisible by the number formed by the first and last digit are known as gapful numbers . Evenly divisible means divisible with no remainder. All one─ and two─digit numbers have this property and are trivially excluded. Only numbers ≥ 100 will be considered for this Rosetta Code task. Example 1037 is a gapful number because it is evenly divisible by the number 17 which is formed by the first and last decimal digits of 1 03 7 . A palindromic number, when the number is reversed, is the same as the original number. Show (nine sets) the first 20 palindromic gapful numbers that end with: the digit 1 the digit 2 the digit 3 ··· ··· the digit 9 #include <iostream> using namespace std ; int finddigits ( int a ) { int cnt = 1 ; ...