Self-describing numbers: Difference between revisions

m
added whitespace and highlighting to the task's preamble.
m (→‎{{header|REXX}}: changed/added comments and whitespace, changed indentations.)
m (added whitespace and highlighting to the task's preamble.)
Line 4:
An integer is said to be "self-describing" if it has the property that, when digit positions are labeled 0 to N-1, the digit in each position is equal to the number of times that that digit appears in the number.
 
For example,   '''2020'''   is a four-digit self describing number:
 
*   position   0   has value   2   and there are two 0s in the number;
*   position   1   has value   0   and there are no 1s in the number;
*   position   2   has value   2   and there are two 2s;
*   position   3   has value   0   and there are zero 3s.
 
<br>
Self-describing numbers < 100.000.000&nbsp; are: &nbsp; &nbsp; 1210, &nbsp; 2020, &nbsp; 21200, &nbsp; 3211000, &nbsp; 42101000.