Ashutosh Dubey
Dedicated to Programming
Research Area
Saturday, December 5, 2009
PROGRAM 3 BY Ashutosh Dubey
#include
#include
void swap(int,int);
void main()
{
clrscr();
int a,b;
a=10;
b=20;
cout<<"Values before swap"<
cout<<"a="<
cout<<"b="<
swap(a,b);
cout<<"Values after swap"<
cout<<"a="<
cout<<"b="<
getch();
}
void swap(int a, int b)
{
int t;
t=a;
a=b;
b=t;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment