Answers for "min()in c++"

C++
1

min in c++

int n = min({2,3,4,5});

// n = 2
Posted by: Guest on December-27-2021
0

C++ min

#include <iostream>

template <class T> const T& min(const T& a, const T& b)
{
	return a < b ? a : b;
}

int main()
{
	std::cout << min(1, 2) << std::endl;
}
Posted by: Guest on August-08-2021

Browse Popular Code Answers by Language