Tuesday, December 6, 2011

Write a C Program to swapping without third variable II

#include <stdio.h>
#include <conio.h>
void main()
{
 int a,b;
 clrscr();
 printf("Enter value for a and b: ");
 scanf("%d %d",&a,&b);
 printf("\nAfter swapping\na and b: %d %d",b,a);
 getch();
}

No comments:

Post a Comment