Pregunta de entrevista de Intel Corporation

given 2 variables that hold integers, a and b, write pseudo code that replaces them without using another variable. After I answered they asked a follow up question - the same, but without using "+" operator

Respuesta de la entrevista

Anónimo

1 ago 2017

for the first question: a <- a+b; b<-a; a<- a-b; for the second question (if both are non zero) a <- a*b; b<-a; a<- a/b;