You are viewing a single comment's thread. Return to all comments →
int getMax (vector<int> nums){ int max = INT_MIN; //#include <limits.h> for(int i : nums){ if(i > max) max = i; } return max; } int main() { vector<int> nums; int a; for(int i = 0; i < 4; ++i){ cin >> a; nums.push_back(a); } cout << getMax(nums); return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Functions
You are viewing a single comment's thread. Return to all comments →