09/02/05 15:16:54
>>301
#include <stdio.h>
int main(void)
{
int i, j, c;
char seq[] = "tion";
i = 0;
while ((c = getchar()) != EOF) {
if (c == seq[i]) {
i++;
if (i == sizeof(seq) - 1) {
break;
}
}
else {
for (j = 0; j < i; j++) {
putchar(seq[j]);
}
i = 0;
putchar(c);
}
}
return 0;
}