//Program to swap or interchange two numbers without using variable.
#include<stdio.h>
#include<conio.h>
main()
{
int a=10, b=20;
clrscr();
printf("\n Before interchange the value is: a=%d, b=%d",a,b);
a=a+b;
b=a-b;
a=a-b;
printf("\n After interchange the value is: a=%d, b=%d",a,b);
getch();
}
#include<stdio.h>
#include<conio.h>
main()
{
int a=10, b=20;
clrscr();
printf("\n Before interchange the value is: a=%d, b=%d",a,b);
a=a+b;
b=a-b;
a=a-b;
printf("\n After interchange the value is: a=%d, b=%d",a,b);
getch();
}