We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b4ba698 + a0a3172 commit 1506a2aCopy full SHA for 1506a2a
chapter_3/exercise_3_05/itob.c
@@ -39,7 +39,7 @@ void itob(int n, char s[], int b)
39
{
40
s[i++] = itoc(abs(n) % b);
41
n /= b;
42
- } while (n /= b);
+ } while (n);
43
44
switch (b)
45
0 commit comments