Answers for "find the max element in array c++"

C++
8

c++ max of array

cout << " max element is: " << *max_element(array , array + n) << endl;
Posted by: Guest on May-22-2020
2

max element in array

int max;
max=INT_MIN;

for(int i=0;i<ar.length();i++){
	if(ar[i]>max){
    	max=ar[i];
    }
Posted by: Guest on October-09-2020

Code answers related to "find the max element in array c++"

Browse Popular Code Answers by Language