wap to swap two number using three variable in c language
wap to swap two number using three variable in c language
Program:-
#include<stdio.h>
#include<conio.h>
main()
{
int a,b,c;
clrscr();
printf("enter the value for a");
scanf("%d",&a);
printf("enter the value for b");
scanf("%d", & b);
printf("before swaping value of a=%d and b=%d",a,b);
c=a;
a=b;
b=c;
printf("after swaping value of a=%d and b=%d",a,b);
getch();
}
No comments
Post a Comment