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

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.