Google Search

Sunday, October 30, 2011

WRITE A C PROGRAM TO SWAP OF TWO NUMBER


WRITE A PROGRAM TO SWAP OF TWO NUMBER

#include<stdio.h>
#include<conio.h>
void main()
{
int a,,b,temp;
clrscr();
printf(“Enter the number of a&b \n”);
scanf(“%d\n%d\n”,&a,&b);
temp=a;
a=b;
b=temp;
printf(“the swapped values are \n”);
printf(“%d\n%d\n”,a,b);
getch();
}

1 comments:

Post a Comment