How to swap two number without taking third variable?

The important code goes here:-

#include<stdio.h>
#include<conio.h>
int main ()
{
int x,y;
clrscr();
printf(“Enter your two number\n”);
scanf(“%d%d”,&x,&y);
x=x+y;
y=x-y;
x=x-y;
printf(“%d\n%d\n”,x,y);
getch();
}

Out come of above code is:-

Leave a Reply