Skip to content

Commit

Permalink
fixed print_i
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenni-Foued committed Nov 1, 2020
1 parent a601bf8 commit e5d1048
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions print_i.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ int print_i(va_list arg)
unb = nb;
if (unb > 0)
{
while (unb != 0)
{
tab[i] = (unb % 10) + '0';
unb /= 10;
i++;
}
i--;
while (i >= 0)
{
_putchar(tab[i]);
while (unb != 0)
{
tab[i] = (unb % 10) + '0';
unb /= 10;
i++;
}
i--;
count++;
}
while (i >= 0)
{
_putchar(tab[i]);
i--;
count++;
}
}
else
{
Expand Down

0 comments on commit e5d1048

Please sign in to comment.