Thread: Some problems
View Single Post
  #2 (permalink)  
Old November 16th, 2007, 01:59 PM
liorm liorm is offline
Registered User
 
Join Date: Nov 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Swapin, enjoy..

Code:
//Swaping, add using for cout,endl..
int main(void)
{
 int a=321,b=258;
 cout << "Before swaping: a=" << a << " b=" << b << endl;
 a=a+b; 
 b=a-b; 
 a=a-b; 
 cout << "After Swaping: a=" << a << " b=" << b << endl;
 return 0;
}
Reply With Quote