#include <iostream>
using namespace std;
void main()
{
int a[10]={1,2,3,4,5,6,7,8,9,0},m; //这里你可以自己用一个循环来输入你想要的数
register i;
cout<<"Please input the number you want find:";
cin>>m;
for(i=0;i<10;i++){
if(m==a[i])
cout<<"The number is in the "<<i+1<<"th"<<endl;
}
if(i==10){
if(m!=a[i])
cout<<"The number you find is not exist,please check it out!"<<endl;
}
}
[
本帖最后由 小J 于 2009-10-16 21:40 编辑 ]