Re: swapping two numbers
[email protected] ("Leonid Grinberg")
| Newsgroups | perl.fwp |
|---|---|
| Message-ID | <[email protected]> |
> not in-place cause it's 3 lines, but does not use an external temporay > value, and should be language-independent: > x = x + y > y = x - y > x = x - y > (IIRC my high school BASIC teacher taught us that) Yeah, that works. Who said that it can't be 3 lines.