fork download
  1. #include <iostream>
  2. #include <algorithm>
  3.  
  4. template < typename T >
  5. T max( const T& a, const T& b, const T& c )
  6. {
  7. return std::max({a,b,c});
  8. }
  9.  
  10. int main()
  11. {
  12. std::cout << max(-1,10,-2) << '\n'
  13. << max('a','1','A') << '\n';
  14. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
10
a