Preview:
#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);
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter