| Below source code will help you to swap values between two integer with help of temp variable and without temp variable
//define two variable
int i=2;
int j=6;
//with temp varible
int temp //as a temp varible
//swapping
int temp=i; //swap first variable to temp variable
int i=j; //swap value of second variable to first
j=temp //swap temp to second varible
//without temp varible
i=i+j; //add both number
j=i-j; //subtract second from first
i=i-j; //subtract second from first | | |