print integer to stdout using write or putchar?

[ad_1]

print integer to stdout using write or putchar?
#include "my_putchar.h"
/* 0x2D = '-'
 * 0x0 = NUL */
int my_put_nbr(int n)
{
        if (n < 0)
        {
                my_putchar(0x2D);
                n = -n;
        }

        if (n > 9)
        {
                my_put_nbr(n/10);
        }

        my_putchar((

        return 0;
}

[ad_2]

Please follow and like us:
Content Protection by DMCA.com