hello friends....
TAKE THE FIRST STEP TO KNOWLEDGE FRIENDS BECAUSE KNOWLEDGE IS FREE.
>> /* WRITE A C PROGRAM TO SWAP TWO NUMBERS. */
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("enter any two value : \n");
scanf("%d%d",&a,&b);
printf("before swapping value\n");
printf("a=%d\t b=%d\n",a,b);
c=a;
a=b;
b=c;
printf("after swapping value\n");
printf("a=%d\t b=%d\n",a,b);
getch();
}
/* OUTPUT */
====================
enter any two value :
10
20
before swapping value
a=10 b=20
after swapping value
a=20 b=10
* * * * * * * * * * * * * *http://www.dnpdeveloper.com
if you have like this blog so share and subscribe, comment for this blog.
if your any question, so comment pleass.
MY INSTAGRAM ID : dnp176
Comments
Post a Comment