fork download
  1. #include <iostream>
  2.  
  3. constexpr int test(const int a, const int b) {
  4. return a+b;
  5. }
  6.  
  7. int main() {
  8. int k = 2;
  9. const int n = k+1;
  10. std::cin >> k;
  11. std::cout << test(k, n) << '\n';
  12. std::cout << test(1, 2) << '\n';
  13. return 0;
  14. }
Success #stdin #stdout 0s 3464KB
stdin
41
stdout
44
3