Answers for "min function in c++"

C++
0

min function in c++

#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int a = 5;
    int b = 7;
    cout << std::min(a, b) << "\n";
  
    // Returns the first one if both the numbers
    // are same
    cout << std::min(7, 7);
  
    return 0;
}
Posted by: Guest on July-28-2021

Browse Popular Code Answers by Language