Answers for "how to find max of 3 numbers in c++ stl"

C++
8

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
3

max two numbers c++

template <class T> inline T max(T a, T b)
{ 
  return a > b ? a : b;
}
//Example: max(2,5) = 5
Posted by: Guest on May-05-2021

Browse Popular Code Answers by Language