#include<stdio.h>
void
main()
{
int a,b;
clrscr();
printf("Enter The Value for A &
B\n");
scanf("%d%d",&a,&b);
printf("Values Before Swapping A &
B \n");
printf("A=%d \t B=%d \n",a,b);
a=a+b;
b=a-b;
a=a-b;
printf("Values After Swapping\n
");
printf("A=%d \t B=%d",a,b);
getch();
}
OutPut:
Enter
The Value for A & B
123
456
Values
Before Swapping A & B
A=123 B=456
Values
After Swapping
A=456
B=123
Thank Your Valuable Comment Tool to Insert codes in Comments : Convert My Code. Hide