fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. inline int max(int n1, int n2) {
  5. return (n1 > n2) ? n1 : n2;
  6. }
  7.  
  8. int main() {
  9. int i1 = 5, i2 = 6;
  10. cout << max(i1, i2) << endl; // inline request to expand to (i1 > i2) ? i1 : i2
  11. return 0;
  12. }
Success #stdin #stdout 0.01s 5272KB
stdin
 
stdout
6