Swap Tow Number:-
#include<iostream>
using namespace std;
int
main(){
int
a,b;
cout<<"Enter
(A) Number"<<endl;
cin>>a;
cout<<"Enter
(B) Number"<<endl;
cin>>b;
cout<<"Before
The Swap A = "<<a<<endl;
cout<<"Before
The Swap B = "<<b<<endl;
a=a+b;
b=a-b;
a=a-b;
cout<<"After
The Swap A = "<<a<<endl;
cout<<"After
The Swap B = "<<b<<endl;
return
0;
Comments
Post a Comment