1// SWAP USING THIRD VARIBLE
2#include <stdio.h>
3int main()
4{
5int var1, var2, temp;
6printf("Enter two integersn");
7scanf("%d%d", &var1, &var2);
8printf("Before SwappingnFirst variable = %dnSecond variable = %dn", var1, var2);
9temp = var1;
10var1 = var2;
11var2 = temp;
12printf("After SwappingnFirst variable = %dnSecond variable = %dn", var1, var2);
13return 0;
14}
1var a=window.prompt('enter a number')var b=window.prompt('enter a number')var a=a+b;var b=a-b;var a=a-b;console.log ("value of a is",a);console.log('value of b is',b);