#include#include int main() { int a = 10; int b = 20; int c = std::min(a, b); std::cout << c << std::endl; // output: 10 return 0; }
#includeIn this example, we have declared two double variables, a and b, and assigned them the values 1.5 and 3.7. We then declared a third double variable, c, and assigned to it the value of std::min(a, b), which is 1.5. We then printed out the value of c. Package/Library: This function is part of the C++ Standard Library, which is included in all standard implementations of the C++ programming language.#include int main() { double a = 1.5; double b = 3.7; double c = std::min(a, b); std::cout << c << std::endl; // output: 1.5 return 0; }