.. www.engineerscur.blogspot.com: C language program to swap two numbers without third variable

C language program to swap two numbers without third variable

//swapping two numbers without third variable

#include<stdio.h>
#include<conio.h>
void main()
{
            int i,j;
            clrscr();
            cprintf("enter the value of a:");
            scanf("%d",&i);
            cprintf("enter the value of b:");
            scanf("%d",&j);
         i=j+i;
            j=i-j;
            i=i-j;
            printf("a=%d and b=%d",i,j);

            getch();
}