¿Esta es tu empresa?
Brain Teaser: Swap two numbers without using a temporary third variable.
Anónimo
a = a+ b b = a - b a = a-b
Example: A=5, B=7 B=B*A^2=7*25 A=B/(A^2)=7*25/25=7 B=sqrt(B/A)=sqrt(7*25/7)=5
I provided a solution involving using multiplication/division to store the information about both numbers in a single variable
Sigue a tus empresas favoritas para estar al tanto de las últimas oportunidades y disponer de información desde adentro.
Recibe recomendaciones y actualizaciones personalizadas al iniciar tu búsqueda.