1 #include<stdio.h> 2 3 int main(void) 4 { 5 int i; 6 char str[80]; 7 char ch, temp; 8 9 ch = getchar(); //需要查找的字符 10 temp = getchar(); //第一行回车 11 12 i = 0; 13 while ((str[i] = getchar()) != ' ') 14 { 15 i++; 16 } 17 str[i] = '
1 #include<stdio.h> 2 3 int main(void) 4 { 5 int i; 6 char str[80]; 7 char ch, temp; 8 9 ch = getchar(); //需要查找的字符 10 temp = getchar(); //第一行回车 11 12 i = 0; 13 while ((str[i] = getchar()) != ' ') 14 { 15 i++; 16 } 17 str[i] = '