Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- int main() {
- FILE * input;
- int v[26] = {0};
- input = fopen("in.txt", "r");
- char c;
- while (fscanf(input, "%c", &c) != EOF) {
- if (c > 96)
- c -= 32;
- v[c - 65]++;
- }
- int i;
- for (i = 0; i < 26; i++) {
- if (v[i] != 0)
- printf("%c: %d ori\n", i + 65, v[i]);
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement