25 lines
356 B
C
25 lines
356 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int main(void) {
|
|
|
|
FILE *file;
|
|
char text[10000];
|
|
int i, n = 0;
|
|
size_t length = sizeof(text) / sizeof(char);
|
|
|
|
file = fopen("cypherpunk.txt", "r");
|
|
|
|
fgets(text, 10000, file);
|
|
|
|
for (i = 0; i < length; ++i) {
|
|
if (text[i] == 'c') {
|
|
n++;
|
|
}
|
|
}
|
|
|
|
printf("%d", n);
|
|
|
|
return EXIT_SUCCESS;
|
|
}
|
|
|