|
#include<bits/stdc++.h>
using namespace std;
void swap(int &a,int &b);
int swap(int n);
int main()
{
int x=1,y=2;
cout<<x<<' '<<y<<endl;
swap(x,y);
cout<<x<<' '<<y;
return 0;
}
void swap(int &a,int &b)
{
int t=a;
a=b;
b=t;
}
int swap(int n)
{
long long int i,s=1;
for(i=n;i>0;i--)
{
s=s*i;
}
return s;
} |
|