Write a program to Exchange two value use third variable in c
#include
#include
main()
{
int a,b,c;
clrscr();
printf("\n ENTER VALUE A:-");
scanf("%d",&a);
printf("\n ENTER VALUE B:-");
scanf("%d",&b);
c=a;
a=b;
b=c;
printf("\n a=%d,b=%d",a,b);
getch();
}
OUTPUT
ENTER VALUE A:12
ENTER VALUE B:28
A=28,B=12
No comments:
Post a Comment