麻烦帮忙看看有什么问题。。循环跳不出去。。
#include <stdio.h>int main(void)
{
char f[81];
int a=0;
char ch;
puts("input the array");
gets(f);
puts("put a char");
ch=getchar();
while(f[a]!='\0')
{
if(f[a]==ch)
printf("the first location is %d\n",a);
a++;
}
printf("there is no %s in the array\n",ch);
return 0;
}