A program to swap two number without using third variable:
****************************program****************************************
#include<stdio.h>
#include<conio.h>
int main()
{
int num1,num2;
printf("\n enter the 1st number:");
scanf("%d",&num1);
printf("\n enter the 2nd number:");
scanf("%d",&num2);
printf("\n the digits of the num1 is %d & num2 is %d",num2,num1);
getch();
}
****************************output*****************************************
|
out put of the program to swap of two num with out using 3rd variable |
No comments