Program To Swap Two number Using Third Varible

#include<conio.h>

#include<stdio.h>

void main()

{

int a,b,c=o;

clrscr();

printf("Enter the two number");

scanf("%d%d",&a,&b);

printf("Before swapping the value of A=%d \n B=%d",a,b);

c=a;

a=b;

b=c;

printf("\n After swapping the value of A=%d \n B=%d",a,b);

getch();

}

Output

Enter the two number=35,48

Before swapping the value of A=35, B=48

After swapping the value of A=48,  B=35

Comments

Popular posts from this blog

Gove confirms mandatory housebuilding targets for councils will be abolished in face of Tory rebellion – UK politics live

Kotak Mahindra Bank Recruitment 2022 Released for Graduate Candidates And Apply Online