Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (22 sloc) 0.421 kB
#include <stdio.h>
#define FS ' '
#define LS '~'
#define SIZE (LS - FS) + 1
void main()
{
int c, i, j;
int histo[SIZE];
for(i = 0; i < SIZE; i++)
histo[i] = 0;
while((c = getchar()) != EOF) {
if (c >= FS && c <= LS) {
histo[c - FS]++;
}
}
for(i = 0; i < SIZE; i++) {
printf(" %c ", i + FS);
for(j = 0; j < histo[i]; j++)
printf("=");
printf("\n");
}
}
Jump to Line
Something went wrong with that request. Please try again.