C++ Blog
code examples in c++ language
Tuesday, June 17, 2014
c++ program to swap two values
#include<iostream.h>
#include<conio.h>
using namespace std;
int main( )
{
int temp;
int a;
int b;
cout<<"please enter first integer ";
cin>>a;
cout<<"please enter second integer";
cin>>b;
temp=a;
a=b;
b=temp;
cout<<"after swapping"<<endl<<a<<b;
return 0;
getch();
}
No comments :
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments ( Atom )
No comments :
Post a Comment