#include<iostream> using namespace std; int main() { int a[11]; int x; cout<<"please input 10 numbers:"<<endl; for(int i=0;i<10;i++) { cin>>a[i]; } cout<<"please the number you want to find:"<<endl; cin>>x; for(int j=0;j<10;j++) { if(a[j]==x) { cout<<"在数组中找到"<<x<<"了,"<<"它在第"<<j+1<<"位"<<endl; }else { a[10]=x; } } return 0; }