Search
 
SCRIPT & CODE EXAMPLE
 

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;
}
Comment

max and min function in c++

int a = min(2,3);		// for two arguments
int b = max(2,3);
int x = min({2,3,4,5});  // for more than two arguments
int y = max({2,3,4,5});
// a = 2 	b = 3
// x = 2	y = 5
Comment

PREVIOUS NEXT
Code Example
Cpp :: cpp compiler online 
Cpp :: error in c++ 
Cpp :: deque 
Cpp :: C++ Syntax for Passing Arrays as Function Parameters 
Cpp :: c++ stl 
Cpp :: substring function in c++ 
Cpp :: c++ shared pointer operator bool 
Cpp :: ue4 endoverlap c++ 
Cpp :: cpp serial print override always in same place 
Cpp :: C+++++++++++++++++++++++++++ JAVA 
Cpp :: function for reversing an array c++ stl 
Cpp :: in built function to find MSB in cpp 
Cpp :: Code debut C++ 
Cpp :: print all variables separated by comma c++ 
Cpp :: c++ break statement 
Cpp :: how to pronounce beaucoup 
Cpp :: nand in cpp 
Cpp :: convert c++ to c online 
Cpp :: progress bar custom color c++ buider 
Cpp :: linq select where string equals "String" 
Cpp :: tu hi hai aashiqui song lyrics 
Cpp :: sinh nhi phan c++ 
Cpp :: variadic template constructor matches better than copy constructor 
Cpp :: C++ initializing a thread with a public function of a class 
Cpp :: deliberation meaning 
Cpp :: c++ str 
Cpp :: shrek c++ 
Cpp :: xor linked list 
Cpp :: check if number is positive or negative in cpp 
Cpp :: can you use rand to read in from an external file inc++ 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =