Write a program in C++ to swap two numbers

Write a program in C++ to swap two numbers.





#include<iostream>
using namespace std;
int main()
{
 int x,y,z;
 cout<<"Enter first number ";
 cin>>x;
 cout<<"Enter second number ";
 cin>>y;
 z=y;
 y=x;
 x=z;
 cout<<"After Swapping the first number is "<<x<<endl;
 cout<<"After Swapping the second number is "<<y<<endl;


}


Write a program in C++ to swap two numbers