All Data For Free
Pages
Home
Watch Full WWE Episodes of Raw and Smackdown
Contact Us
Copyright Policy
Sunday, 27 November 2011
C++ Program For Swap 2 Variables Using Function [Call By Value]
#include<iostream.h>
#include<conio.h>
void swap(int a,int b)
{
int temp;
temp=a;
a=b;
b=temp;
cout<<"\n"<<a<<" "<<b;
}
void main()
{
void swap(int a,int b)
int a,b;
cout<<"enter two numbers";
cin>>a>>b;
swap(a,b)
cout<<a<<" "<<b;
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment