Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

max element of an array stl c++

    vector<int>arr {1, 34 , 50, 4, 400};
    int maximumElement = *max_element(arr.begin(), arr.end());
    int minimumElement = *min_element(arr.begin(), arr.end());
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #max #element #array #stl
ADD COMMENT
Topic
Name
2+9 =