ダディクールがC/C++の宿題を片づけます 32代目
■ このスレッドは過去ログ倉庫に格納されています
0273 . |(○), 、(○)、.:| +
NGNG#include<memory.h>
#include<stdio.h>
#define INPUT_PATH "eibun.dat"
int main() {
int table[0xff];
FILE *file;
int c;
file = fopen(INPUT_PATH, "r");
if (!file)
return 1;
memset(table, 0x0, sizeof(table));
while((c = getc(file)) != EOF)
++table[c];
fclose(file);
printf("あ %d\n", table['a'] + table['A']);
printf("い %d\n", table['i'] + table['I']);
printf("う %d\n", table['u'] + table['U']);
printf("え %d\n", table['e'] + table['E']);
printf("お %d\n", table['o'] + table['O']);
return 0;
}
■ このスレッドは過去ログ倉庫に格納されています