#include <limits>
int imin = std::numeric_limits<int>::min(); // minimum value
int imax = std::numeric_limits<int>::max(); // maximum value (2147483647)
// 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;
}
#include <climits>
INT_MAX // 2147483647
int INT_MAX = 2147483647;
#include<algorithm>
using namespace std;
int main(){
int exa=8;
int exa2=20;
max=max(exa,exa2);
}
2147483647
unsigned long long int = 18 446 744 073 709 551 615
// max example
#include <iostream> // std::cout
#include <algorithm> // std::max
int main () {
std::cout << "max(1,2)==" << std::max(1,2) << '
';
std::cout << "max(2,1)==" << std::max(2,1) << '
';
std::cout << "max('a','z')==" << std::max('a','z') << '
';
std::cout << "max(3.14,2.73)==" << std::max(3.14,2.73) << '
';
return 0;
}
int i=INT_MAX;
#include <algorithm> // these two line of code should bw included
using namespace std;
class RandomClass
{
int Functions(int a,int b)
{
return max(a,b);
}
};