Given two int variables , firstplacewinner and secondplacewinner, write some code that swaps their values . declare any additional variables as necessary, but do not redeclare firstplacewinner and secondplacewinner. submit

Respuesta :

int i;
i=firstPlaceWinner;
firstPlaceWinner = secondPlaceWinner;
secondPlaceWinner = i;
Lanuel

A code which swaps the values of two int variables is written as follows:

int i;

i = firstPlaceWinner;

firstPlaceWinner = secondPlaceWinner;

secondPlaceWinner = i;

What is a variable?

A variable can be defined as a specific name which refers to a location in computer memory and it is typically used for storing a value such as an integer.

In this scenario, an example of a computer code that swaps the values of two int variables is written as follows:

int i;

i = firstPlaceWinner;

firstPlaceWinner = secondPlaceWinner;

secondPlaceWinner = i;

Read more on variable here: brainly.com/question/20264183

#SPJ2