m2skills

swap2

Mar 29th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.17 KB | None | 0 0
  1. // method that swaps numbers using * and / operations
  2. void swap2(int *num1, int *num2){
  3.     *num1 = *num1 * *num2;
  4.     *num2 = *num1 / *num2;
  5.     *num1 = *num1 / *num2;
  6.    
  7.     return;
  8. }
Add Comment
Please, Sign In to add comment