#include <stdio.h>
int main()
{
int x, y;
printf("Enter two integers: ");
scanf("%d %d", &x, &y);
printf("Before swapping: x = %d, y = %d\n", x, y);
// Swap the values of x and y
x = x + y;
y = x - y;
x = x - y;
printf("After swapping: x = %d, y = %d\n", x, y);
return 0;
}
Output