freq.c
Go to the documentation of this file.
1 #include <stdio.h>
2 #include <ctype.h>
3 
4 char a[26];
5 
6 main()
7 {
8  int i, c;
9 
10  for(i = 0; i < 26; i++) a[i] = 0;
11  while ((c = getchar()) != EOF) {
12  i = tolower(c) - 'a';
13  if(i >= 0 && i < 26) a[i] += 1;
14  a[i] %= 10;
15  }
16  for(i = 0; i < 26; i++) putchar(a[i]+'0');
17  putchar('\n');
18 }
main()
Definition: freq.c:6
char a[26]
Definition: freq.c:4


euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 6 2019 20:00:44