0

One line statement to swap two numbers

26th Apr 2020, 2:30 PM
Abhishek Mahato
Abhishek Mahato - avatar
3 Respostas
+ 1
yes, you can, with some () in assignment, but that's a bad practice. Read this article "Goodbye Clean Code" https://www.sololearn.com/post/223948/?ref=app The article Goodbye clean code is about a programmer sharing his experience, that he struggled for succinct code at work, and thought all colleagues are against him; many years later, he understood the importance of readability and easiness for maintenance. I posted this here to let you know that pursuing one line is not the right way. https://code.sololearn.com/WKKkpq0efxai/?ref=app
26th Apr 2020, 2:52 PM
Gordon
Gordon - avatar
0
Alexander Thiem it's my personal doubt whether it can be possible or not
26th Apr 2020, 2:47 PM
Abhishek Mahato
Abhishek Mahato - avatar
0
Alexander Thiem one line means within one termination to get two values swapped
26th Apr 2020, 2:50 PM
Abhishek Mahato
Abhishek Mahato - avatar