PROGRAM TO INTERCHANGE THE VALUE OF A AND B

Programming Languages

/* PROGRAM TO INTERCHANGE THE VALUE OF A AND B */

#include<stdio.h>
#include<conio.h>

void main()
{
int a,b,temp;
clrscr();
printf(“\n\n ENTER THE VALUE OF A :”);
scanf(“%d”,&a);
printf(“\n\n ENTER THE VALUE OF B :”);
scanf(“%d”,&b);
temp=a;
a=b;
b=temp;
printf(“\n\nAFTER INTERCHANGING”);
printf(“\n\nA : %d”,a);
printf(“\n\nB : %d”,b);
getch();
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.