Answers for "Swap the contents of the int variables x and y. (Declare additional variables, if necessary.)\"

0

Swap the contents of the int variables x and y. (Declare additional variables, if necessary.)\

int x=25, y=18;
int temp = 10;
char ch = 'A';
x += 5;
double payRate = 12.50;
tempNum = firstNum;

// #include <algorithm>
std::swap(x, y);

// #include <iostream>
std::cout << x << '\t' << y << '\t' << x + 12 / y - 8 << std::endl;

x = z;
Posted by: Guest on October-23-2021

Code answers related to "Swap the contents of the int variables x and y. (Declare additional variables, if necessary.)\"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language