#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;
}

 

相关文章:

  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案