Guest User

Untitled

a guest
Nov 19th, 2019
81
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. /* Define your function here */
  5. void SwapValues(int& userVal1, int& userVal2)
  6. {
  7. int a = userVal1;
  8. userVal1 = userVal2;
  9. userVal2 = a;
  10. cout << userVal1 << " " << userVal2 << endl;
  11.  
  12. }
  13.  
  14. int main() {
  15. /* Type your code here. Your code must call the function. */
  16. int userVal1;
  17. int userVal2;
  18. cin >> userVal1 >> userVal2;
  19. SwapValues(userVal1, userVal2);
  20. return 0;
  21. }
RAW Paste Data