Posted by : Waqas Javed 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

Contact Us

Stay updated for more codes if we u want any code write us by commenting below or email us.
If you want to hire us for your semester project email us at above given email or call or message
Email: 14bscswjaved@seecs.edu.pk
Phone no: 0308-8109708

Popular Post

Powered by Blogger.

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