C++ Program to Print Minimum Value using min() Algorithm

This C++ program prints minimum of two values using min algorithm. The function takes two objects as the parameters by const reference and the third parameter is optional which is a predicate. The predicate can be used for objects which can not be compared like primitive datatypes and hence can be compared on the basis of some key.

Here is the source code of the C++ program which prints minimum of two values using min algorithm. The C++ program is successfully compiled and run on a Linux system. The program output is also shown below.