Pergunta de entrevista da empresa SAP

How can you swap two variables without using a third temporal variable?

Respostas da entrevista

Sigiloso

9 de ago. de 2016

By adding and subtracting. (You have to figure out the math)

1

Sigiloso

15 de fev. de 2019

Suppose: a=5 b=4 a=a+b % 9 b=a-b % 5 a= a-b % 4