#include <stdio.h>
#define MAXLENGTH 15
int main()
{
int c, i, j, k;
int ndigit[10];
for (i = 0; i < 10; ++i)
ndigit[i] = 0;
i = j = k = 0;
while ((c = getchar()) != EOF)
if (c != ' ' && c != '\n' && c != '\t')
++ndigit[i];
else ++i;
/* output horizontal direction picture */
for (i = 0; i < 10; ++i)
{
printf("%d: ", i);
for (j = 1; j <= ndigit[i]; ++j)
printf("* ");
printf("\n");
}
/*output vertical direction picture*/
for (k = MAXLENGTH; k > 0; --k)
{
for (j = 0; j < 10; ++j)
if ((ndigit[j] - k) >= 0)
printf("* ");
else printf(" ");
printf("\n");
}
for (j = 0; j < 10; ++j)
printf("%d: ", j);
}
#define MAXLENGTH 15
int main()
{
int c, i, j, k;
int ndigit[10];
for (i = 0; i < 10; ++i)
ndigit[i] = 0;
i = j = k = 0;
while ((c = getchar()) != EOF)
if (c != ' ' && c != '\n' && c != '\t')
++ndigit[i];
else ++i;
/* output horizontal direction picture */
for (i = 0; i < 10; ++i)
{
printf("%d: ", i);
for (j = 1; j <= ndigit[i]; ++j)
printf("* ");
printf("\n");
}
/*output vertical direction picture*/
for (k = MAXLENGTH; k > 0; --k)
{
for (j = 0; j < 10; ++j)
if ((ndigit[j] - k) >= 0)
printf("* ");
else printf(" ");
printf("\n");
}
for (j = 0; j < 10; ++j)
printf("%d: ", j);
}