C++ 代码
#include <iostream>
using namespace std;
int main()
{
int N;
int min,flag=0;
cin >>N;
int x[N];
for(int i=0;i<N;i++)
cin>>x[i];
min = x[0];
for(int i =0;i<N;i++)
{
if(min >x[i])
{
min = x[i];
flag = i;
}
else
continue;
}
printf("Minimum value: %d\n",min);
printf("Position: %d\n",flag);
return 0;
}