Pages

Write A Program To Swap A Two Number With Each Other

Wednesday 8 May 2013


#include <stdio.h>
#include <conio.h> 
int main()
{
   int x, y, temporay;
   printf("Enter the value of x and y\n");
   scanf("%d%d", &x, &y);
   printf("Before Swapping\nx = %d\ny = %d\n",x,y);
   temporay = x;
   x    = y;
   y    = temporay;
   printf("After Swapping\nx = %d\ny = %d\n",x,y);

 getch();
}

 

Search Box

Most Reading

Contact Form

Name

Email *

Message *