#include <stdio.h>
#include <unistd.h>

void print(char c)
{
    if (c >= 0 && c <= 9)
    {
        c = c + '0';
        write (1, &c, 1);
    } else {
        write (1, &c, 1);
    }
}
int main()
{
    int i = 0;
    int j = 1;
    while (i <= 20)
    {
        print(i);
        if (i > 9)
        {
            while (j < 9)
            {
                print(j);
                print(j);
                j++;
            }
        }
        i++;
    }
    
    return 0;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: