#include <iostream>
#include<algorithm>
using namespace
int main()
{
int nArray[5]={2, 10, 5, 1, 4};
cout<< "最大值:" << *max_element(nArray,nArray+5) << endl;
cout<< "最小值:<< *min_element(nArray,nArray+5) << endl;
cout<< "最大值下标:"<< max_element(nArray,nArray+5)-nArray << endl;
cout<< "最小值下标:"<< min_element(nArray,nArray+5)-nArray << endl;
return 0;
}