#include<stdio.h> #include<conio.h> int main() { int a,b; clrscr(); printf("Enter the Values for a & b to Swap: "); scanf("%d %d",&a,&b); a=a+b; b=a-b; a=a-b; printf("After Swapping the Values of a & b are :%d %d",a,b); return 0; }
OUTPUT:
Enter the Values for a & b to Swap: 10 20 After Swapping the Values of a & b are :20 10