swap to number

Go4Expert Member
26Oct2006,18:53   #1
Ziaur Rahman's Avatar
Code:
#include<stdio.h>
#include<conio.h>
#define SWAPE(x,y) int t;t=x;x=y;y=t;
main()
{
int a,b;

Printf("\n Enter two number");
scanf("%d%d",&a,&b);
Printf("\n Before swaping the Value of a=%d and b=%d",a,b);
SWAPE(a,b);
printf("\n After swap value of a=%d and b=%d",a,b);
return 0;
}

Last edited by shabbir; 26Oct2006 at 19:40.. Reason: Code formating.
Go4Expert Founder
26Oct2006,19:41   #2
shabbir's Avatar
Duplicate of Swap two variables using macro article. Thread closed.