Header Ads Widget

Program to swap to numbers without using third variable in c language

program:-

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
printf("Enter two numbers");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("first number=%d and second number=%d",a,b);
getch();
}



Post a Comment

4 Comments