Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- void main()
- {
- int a, b, c;
- std::cout << "Enter first integer: ";
- std::cin >> a;
- std::cout << "\nEnter second integer: ";
- std::cin >> b;
- std::cout << "\nFirst int: " << a << ". Second int: " << b << std::endl;
- c = a;
- a = b;
- b = c;
- std::cout << "Swapped first int: " << a << ". Second swapped int: " << b << std::endl;
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment