Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#include
#include
#include
using namespace std; int main() { int a = 10, b = 25; cout << "Before: a = " << a << " | b = " << b << "\n"; swap(a, b); cout << "After: a = " << a << " | b = " << b << "\n"; return 0; }
Before: a = 10 | b = 25
After: a = 25 | b = 10