Sunday, 15 January 2012

Program To Swap Two Number Using Function In C++

#include<iostream.h>
#include<conio.h>

main()
{
clrscr();
int a,b,c;
cout<<"enter number=";
cin>>a;
cout<<"enter number=";
cin>>b;
sum(a,b);
getch();
}
void sum(int x,int y)
{
int z;
z=x+y;
cout<<z;
}

No comments:

Post a Comment