//Swap values without using third variable
#include<stdio.h>
int main()
{
int a,b;
printf("Enter a = ");
scanf("%d",&a);
printf("\nEnter b = ");
scanf("%d",&b);
printf("\nBefore swaping : a=%d b=%d \n",a,b);

a=a+b;
b=a-b;
a=a-b;

printf("After swap : a=%d b=%d ",a,b);

}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: