29.1k views
3 votes
Given two variables , first_place_winner and second_place_winner, write some code that swaps their associated values. use any additional variables as necessary.

User Ron Davis
by
4.4k points

1 Answer

4 votes

Int a, b;

a=20

b=40

a=a+b

b=a-b

a=a-b

User Lambdageek
by
4.8k points