输入时判断即可
#include<iostream>
using namespace std;
int main()
{
int n,a[1010];
cin>>n;
int min=1001,miny=0;
for (int i=0;i<n;i++)
{
cin>>a[i];
if (a[i]<min)
{
min=a[i];
miny =i;
}
}
cout<<"Minimum value: "<<min<<endl<<"Position: "<<miny;
}