//Program to swap or interchange two numbers using third variable.
#include<stdio.h>
#include<conio.h>
main()
{
int a,b,c;
clrscr();
printf(" enter the value of a and b:");
scanf("%d%d",&a,&b);
printf("\n values of a and b before swapping");
printf("\n a=%d b=%d",a,b);
c=a;
a=b;
b=c;
printf("\n values of a and b after swapping");
printf("\n a=%d b=%d",a,b);
getch();
}
#include<stdio.h>
#include<conio.h>
main()
{
int a,b,c;
clrscr();
printf(" enter the value of a and b:");
scanf("%d%d",&a,&b);
printf("\n values of a and b before swapping");
printf("\n a=%d b=%d",a,b);
c=a;
a=b;
b=c;
printf("\n values of a and b after swapping");
printf("\n a=%d b=%d",a,b);
getch();
}