int main(){ int a[100],i,x,n; printf("请输入整数个数"); scanf("%d",n); printf("请输入%d个整数",n); for(i=0;i scanf("%d",a[i]); printf("请输入要查询的数"); scanf("%d",x); for(i=0;i { if(a[i] == x) break; } if(i else printf("没有数据%d",x); return 0;}