1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 int a[10],min,i,xb; 6 cout<<"Input 10 number:"; 7 for(i=0;i<10;i++) 8 cin>>a[i]; 9 min=a[0]; 10 xb=0; 11 for(i=0;i<10;i++) 12 { 13 if(a[i]<min) 14 { 15 min=a[i]; 16 xb=i; 17 } 18 } 19 cout<<"The min number is:"<<min<<endl; 20 cout<<"The xia biao is:"<<xb<<endl; 21 return 0; 22 }
时间: 2024-11-05 02:28:34