-
-
Save w3Abhishek/a9e1ff7f7532699aae4400191d93c708 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
int a, b; | |
printf("Enter two numbers (a & b) to swap without using third variable:\n"); | |
scanf("%d%d", &a, &b); | |
/* Program by codewin.org */ | |
a = a + b; | |
b = a - b; | |
a = a - b; | |
printf("Here are the swapped values without using third variable: a = %d\nb = %d\n",a,b); | |
printf("CodeWin.org - Winning Hearts of Coders!!!"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment