C++ program for swapping using third variable.

#include<iostream.h>
#include<conio.h>
void main(){
float a,b,c;
clrscr();
cout<<"Enter Two Numbers"<<endl;       
cin>>a,b;
cout<<"Before Swapping-"<<endl<<"a= "<<a<<" and b= "<<b<<endl;
c=a;
a=b;
b=c;
cout<<"After Swapping-"<<endl<<"a= "<<a<<" and b= "<<b<<endl;           
getch();
}

Comments

Popular posts from this blog

OOPs using C++ Language Topics Covered

IMP Questions of OOPS using CPP