AD4BP

Write a programe swap two number without using third variable .

Input:-

#include< stdio.h >
#include< conio.h >
void main( )
{
int a,b;
clrscr( );
printf("Enter value of a: ");
scanf("%d",&a);
printf("Enter value of b: ");
scanf("%d",&b);
a=b-a;
b=b-a;
a=a+b;
printf("\nValue of a:%d",a);
printf("\nValue of b:%d",b);
getch( );
}

Output:-
Enter value of a: 25
Enter value of b: 36
Value of a:36
Value of b:25