Monday, December 26, 2011
8:54 PM

C Program to Swap two numbers without using Temporary variable

Program to Swap two numbers without using Temporary variable








#includevoid main(){int a,b;printf("enter two numbers : ");scanf("%d%d",&a,&b);printf("number before swapping %d %d",a,b);a = a+b;b = a -b;a = a - b;printf("\nnumber after swapping %d %d ",a,b);}

0 comments:

Post a Comment