求数组的最小值c++用min函数怎么做? 2021-09-20 17:00 · 稿源: 查看原文 提问:求数组的最小值c++用min函数怎么做? 网友回答: 用循环就可以了,如以下程序:#include #include using namespace std; int arrmin(int *s,int n) { int m=s[0]; for(int i=1;i另外,C++本身就有直接求数组最小值的:min_element