Answers for "12. write a c++ program to swap 2 numbers without using third variable."

C++
0

swap of two numbers in c++

#include<iostream>
using namespace std;
int main()
{
    
    int a,b;
    cin>>a>>b;
    swap(a,b);
    cout<<a<<" "<<b;
    return 0;
}
Posted by: Guest on October-20-2021

Code answers related to "12. write a c++ program to swap 2 numbers without using third variable."

Browse Popular Code Answers by Language