Answers for "how to find max of 3 elements cpp"

C++
3

max three values c++

int a = 1;
    int b = 2;
    int c = 3;

    int m = std::max({a, b, c});
Posted by: Guest on June-10-2020
0

max_element c++

int arr[] = {1,4,2,10};
int n = 4; //size of array
cout<<*max_element(arr,arr+n);

// Output: 10
Posted by: Guest on February-17-2021

Code answers related to "how to find max of 3 elements cpp"

Browse Popular Code Answers by Language