SWAPING 2 VALUES

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("enter any two values\n");
scanf("%d,%d"a,b);
printf("values before swap:%d,%d"a,b);
c=a;
a=b;
b=c;
printf("\n values after swap: %d,%d"a,b);
getch();
}

No comments:

Related Posts with Thumbnails