Swap values of 2nd variables without using 3rd variable in C language

PHOTO EMBED

Tue Apr 11 2023 16:31:01 GMT+0000 (Coordinated Universal Time)

Saved by @UpgraderBoy #c

#include<stdio.h>
#include<conio.h>

int main(){
    int a,b,c;
    printf("Enter the values of two variables to swap them with each other... \n");
    printf("The value of a: ");
    scanf("%d",&a);
    printf("The value of b: ");
    scanf("%d",&b);

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

    printf("The value of a: %d \n",a);
    printf("The value of b: %d",b);
}
content_copyCOPY