09/01/11 13:30:23
>>650
#include<stdio.h>
main()
// int main(int argc, char* argv[])
{
int loop, count;
char ch;
char input[256], output[256];
printf("単語を入力せよ :");
scanf("%s", input);
// strcpy(output, input);
count=0;
for(loop=0; ;loop++) {
ch = input[loop];
output[loop] = ch;
if (ch == NULL) {
break;
}
if (ch == 'e') {
output[loop] = ' ';
count++;
}
}
printf("単語のeを抜かすと:%s\n", output);
printf("単語にeが%d個含まれます。\n", count);
return 0;
}