#include<stdio.h>
main()
{
int array[10]={1,0,4,8,12,65,-76,100,-45,123};
int location;
int i;
printf("\n输入你要查找的数值:");
scanf("%d",&location);
for (i=0;i<10;i++)
if (array[i]=location)
{
printf("%d在数组里\n",location);
}
else
{
printf("%d不在数组里\n",location);
}
}
好象无论如何结果都是在数组中,那里出了问题吗?