fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int constexpr foo(int a, int b) {
  5. return 2*a + b;
  6. }
  7.  
  8. int main() {
  9. cout << foo(2, 5) << endl;
  10. int a, b;
  11. cin >> a >> b;
  12. cout << foo(a, b) << endl;
  13. return 0;
  14. }
Success #stdin #stdout 0s 15224KB
stdin
2 5
stdout
9
9