fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. int sum(int a, int b) {
  6. return a + b;
  7. }
  8.  
  9. int main() {
  10. int x, y;
  11. cout << "Enter two numbers: ";
  12. cin >> x >> y;
  13. cout << "Sum = " << sum(x, y);
  14. return 0;
  15. }
  16.  
  17.  
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
Enter two numbers: Sum = -1439094594