Click here to Upload your own logic for this program.

Write a program swapping or interchange two numbers. (without using third variable)


#include<stdio.h> main() { int x,y; printf("Enter two numbers:\n"); scanf("%d%d",&x,&y); printf("The Entered numbers are:%d,%d\n",x,y); x=x+y; y=x-y; x=x-y; printf("After swapping the numbers are:%d,%d\n",x,y); }

Enter two numbers: 3 4 The Entered numbers are:3,4 After swapping the numbers are:4,3