PropellerAds
Posted by : Unknown Saturday 17 January 2015

This code demonstrate the swaping of two numbers.

//program to swap two numbers input by user
#include<stdio.h>
#include<conio.h>
void main()
{
int x,y,a;

printf("Enter x:");
scanf("%d",&x);
printf("Enter y:");
scanf("%d",&y);
a=x;
x=y; 
y=a;
printf("x is %d\n",x);
printf("y is %d",y);
getch();
}

Leave a Reply

Subscribe to Posts | Subscribe to Comments

PropellerAds
PropellerAds

Popular Post

Powered by Blogger.

- Copyright © BSCS -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -