summaryrefslogtreecommitdiff
path: root/ch01
diff options
context:
space:
mode:
Diffstat (limited to 'ch01')
-rw-r--r--ch01/ex13-histogram.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ch01/ex13-histogram.c b/ch01/ex13-histogram.c
index 14002a5..fbccb2a 100644
--- a/ch01/ex13-histogram.c
+++ b/ch01/ex13-histogram.c
@@ -7,10 +7,10 @@
int main()
{
int c, i, j, nc, state;
- int ndigit[10];
+ int nlen[10];
for (i = 0; i < 10; ++i)
- ndigit[i] = 0;
+ nlen[i] = 0;
nc = 0;
state = OUT;
@@ -20,7 +20,7 @@ int main()
i = nc - 1;
if (i > 9)
i = 9;
- ++ndigit[i];
+ ++nlen[i];
nc = 0;
}
state = OUT;
@@ -36,7 +36,7 @@ int main()
i = nc - 1;
if (i > 9)
i = 9;
- ++ndigit[i];
+ ++nlen[i];
nc = 0;
}
@@ -45,7 +45,7 @@ int main()
printf(" >9: ");
else
printf(" %2d: ", i + 1);
- for (j = 0; j < ndigit[i]; ++j)
+ for (j = 0; j < nlen[i]; ++j)
putchar('#');
putchar('\n');
}