Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

max function in c++

// C++ program to demonstrate the use of std::max
// C++ program to demonstrate the use of std::max
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    // Comparing ASCII values of a and b
    cout << std::max('a','b') << "
";
  
    // Returns the first one if both the numbers
    // are same
    cout << std::max(7,7);
  
return 0;
}
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #max #function
ADD COMMENT
Topic
Name
6+7 =