C program to swap two integer values wihout using third variable
include <stdio.h>
int main()
{
//declare only two variables
int a, b;
printf("\n\nEnter the values of a : ");
scanf("%d",&a);
printf("\nEnter the values of b : ");
scanf("%d",&b);
printf("\nThe values before Swapping are \n");
printf("\n a : %d",a);
printf("\n b : %d",b);
//swapping logic
a = a * b;
b = a /b;
a = a /b;
printf("\n\n The values after Swapping are \n");
printf("\n a : %d",a);
printf("\n b : %d",b);
//hold the screen
getchar();
return 0;
}