Numbers   (positive integers expressed in base ten)   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

187   is a   gapful   number because it is evenly divisible by the
number   17   which is formed by the first and last decimal digits
of    187. 



About   7.46%   of positive integers are   gapful.



Task

   Generate and show all sets of numbers (below) on one line (horizontally) with a title,   here on this page
   Show the first   30   gapful numbers
   Show the first   15   gapful numbers    ≥           1,000,000
   Show the first   10   gapful numbers    ≥    1,000,000,000


Related tasks

   Harshad or Niven series.
   palindromic gapful numbers.
   largest number divisible by its digits.


Also see

   The OEIS entry:   A108343 gapful numbers.
   numbersaplenty gapful numbers


To run:
Start up.
Show the gapful numbers at various spots.
Wait for the escape key.
Shut down.
 
A digit is a number.
 
To get a digit of a number (last):
Privatize the number.
Divide the number by 10 giving a quotient and a remainder.
Put the remainder into the digit.
 
To get a digit of a number (first):
Privatize the number.
Loop.
Divide the number by 10 giving a quotient and a remainder.
Put the quotient into the number.
If the number is 0, put the remainder into the digit; exit.
Repeat.
 
To make a number from the first and last digits of another number:
Get a digit of the other number (first).
Get another digit of the other number (last).
Put the digit times 10 plus the other digit into the number.
 
To decide if a number is gapful:
Make another number from the first and last digits of the number.
If the number is evenly divisible by the other number, say yes.
Say no.
 
To show a number of the gapful numbers starting from another number:
Privatize the other number.
Put 0 into a gapful counter.
Loop.
If the other number is gapful, write "" then the other number then " " on the console without advancing; bump the gapful counter.
If the gapful counter is the number, break.
Bump the other number.
Repeat.
Write "" then the return byte on the console.
 
To show the gapful numbers at various spots:
Write "30 gapful numbers starting at 100:" on the console.
Show 30 of the gapful numbers starting from 100.
Write "15 gapful numbers starting at 1000000:" on the console.
Show 15 of the gapful numbers starting from 1000000.
Write "10 gapful numbers starting at 1000000000:" on the console.
Show 10 of the gapful numbers starting from 1000000000.