22.5k views
2 votes
Given two int variables , firstplacewinner and secondplacewinner, write some code that swaps their values . declare any additional variables as necessary.

User Aboss
by
6.2k points

1 Answer

1 vote
int tmp;
tmp = firstplacewinner;
firstplacewinner = secondplacewinner;
secondplacewinner = tmp;
User Barry Chapman
by
6.2k points