#include<iostream.h>
#include<conio.h>
using namespace std;
int main()
{
int a=1,b=1,c=1;
cout<<"Enter number 'a' ";
cin>>a;
cout<<"Enter number 'b' ";
cin>>b;
/* Swap the value of a to b and b to a */
c=a;
a=b;
b=c;
cout<<"After swaping a = "<<a<<"\n";
cout<<"After swaping b = "<<b;
getch();
}
#include<conio.h>
using namespace std;
int main()
{
int a=1,b=1,c=1;
cout<<"Enter number 'a' ";
cin>>a;
cout<<"Enter number 'b' ";
cin>>b;
/* Swap the value of a to b and b to a */
c=a;
a=b;
b=c;
cout<<"After swaping a = "<<a<<"\n";
cout<<"After swaping b = "<<b;
getch();
}
No comments:
Post a Comment