Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

max c++

// 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;
}
Source by www.cplusplus.com #
 
PREVIOUS NEXT
Tagged: #max
ADD COMMENT
Topic
Name
4+4 =