Preview:
#include <iostream>

using std::cout;
using std::cin;
using std::endl;

int main() 
{

int a = 5;
int b = 10;
int temp; 

cout << "a = " << a << ", b = " << b << endl; 
temp = a; a = b; b = temp; 
cout << "a = " << a << ", b = " << b << endl; 

}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter