#include<stdio.h>
#define swap(a,b) {a=a+b;b=a-b;a=a-b;printf("x=%d y=%d",a,b);}
void main()
{
int x,y;
printf("enter the two numbers\n");
scanf("%d%d",&x,&y);
printf("the numbers before swapping are\n x=%d y=%d\n",x,y);
printf("the numbers after swapping are\n");
swap(x,y);
}
No comments:
Post a Comment