Pages

Write a program to swap numbers using two variables.

Wednesday, 8 May 2013

#include <stdio.h>
#include <conio.h>
main()
{
      int a, b;
      printf("Enter To Numbers: ");
      scanf("%d%d", &a, &b);
      //swaping
      a=a+b;
      b=a-b;
      a=a-b;
      printf("%d %d", a, b);
      getch();
}
 

Search Box

Most Reading

Contact Form

Name

Email *

Message *