C++ examples for Data Type:int
Swapping integers.
#include <iostream> int main()/*from w w w . jav a 2s . com*/ { int first {}, second {}; std::cout << "Enter two integers separated by a space: "; std::cin >> first >> second; first ^= second; second ^= first; first ^= second; std::cout << "In reverse order they are " << first << " and " << second << std::endl; }