Self-describing numbers: Difference between revisions

Content added Content deleted
(Add missing not)
Line 143:
<lang c>#include <stdio.h>
 
int self_desc(const char *s)
{
unsigned char cnt[10] = {0};
Line 176:
{
int i;
const char *nums[] = { "1210", "1337", "2020", "21200", "3211000", "42101000", 0};
 
for (i = 0; nums[i]; i++)