CODE:
#include<iostream>
using namespace std;
int main(){
int a,b;
cout<<"Enter the value of A: ";
cin>>a;
cout<<"Enter the value of B: ";
cin>>b;
cout<<"Before Swapping: \n";
cout<<"A : "<<a<<endl;
cout<<"B : "<<b<<endl;
a=a+b;
b=a-b;
a=a-b;
cout<<"After Swapping: \n";
cout<<"A : "<<a<<endl;
cout<<"B : "<<b<<endl;
return 0;
}
No comments:
Post a Comment
Plz don't enter any spam link in the comment box!