Skip to content

Instantly share code, notes, and snippets.

@funrep
Created September 22, 2012 22:00
Show Gist options
  • Save funrep/3767971 to your computer and use it in GitHub Desktop.
Save funrep/3767971 to your computer and use it in GitHub Desktop.
sasads
#include <stdio.h>
main()
{
int c, nw, nc, i, count[10], total;
count[0] = 0;
count[1] = 0;
count[2] = 0;
count[3] = 0;
count[4] = 0;
count[5] = 0;
count[6] = 0;
count[7] = 0;
count[8] = 0;
count[9] = 0;
count[10] = 0;
total = 0;
nw = 0;
while ((c = getchar()) != EOF) {
if (c != ' ' && c != '\t' && c != '\n') {
++nw;
while (c != EOF && c != ' ' && c != '\t' && c != '\n')
++nc;
count[nw] = nc;
}
}
for (i = 0; i < 10; ++i)
printf("%d\n", count[i]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment