fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int doSomething(int *x, int *y);
  5.  
  6. int main()
  7. {
  8. int input1;
  9. int input2;
  10. cout << "Enter a Value into Input 1: ";
  11. cin >> input1;
  12. cout << "\nEnter a Value into Input 2: ";
  13. cin >> input2;
  14.  
  15. int answer = doSomething(&input1, &input2);
  16.  
  17. cout << "Answer: " << answer;
  18. }
  19.  
  20. int doSomething(int *x, int *y)
  21. {
  22. int temp = *x;
  23. *x = *y * 10;
  24. *y = temp * 10;
  25. return *x + *y;
  26. }
  27.  
Success #stdin #stdout 0s 5332KB
stdin
Standard input is empty
stdout
Standard output is empty