Skip to content

Instantly share code, notes, and snippets.

@ranamahmud
Created June 23, 2015 03:02
Show Gist options
  • Save ranamahmud/ae9fd03ee13df905c44e to your computer and use it in GitHub Desktop.
Save ranamahmud/ae9fd03ee13df905c44e to your computer and use it in GitHub Desktop.
তৃতীয় ভেরিয়েবল ব্যবহার না করে দুটি ভেরিয়েবলের মান সোয়াপ করা
#include <stdio.h>
// Author: Md. Rana Mahmud
int main()
{
int num1, num2;
num1 = 80;
num2 = 34;
printf("Before swap num1 = %d and num2 = %d\n",num1,num2);
num2 = num1 + num2;
num1 = num2 - num1;
num2 = num2 - num1;
printf("After swap num1 = %d and num2 = %d\n",num1,num2);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment