Advertisement
Guest User

Untitled

a guest
Nov 19th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement