Empresa engajada
Write pseudocode to swap two numbers without third variable .
Sigiloso
solution is to use the XOR method (addition method will cause integer overflow for big values) a = a ^ b b = a ^ b a = a ^ b
STEP 1: START. STEP 2: ENTER x, y. STEP 3: PRINT x, y. STEP 4: x = x + y. STEP 5: y= x - y. STEP 6: x =x - y. STEP 7: PRINT x, y. STEP 8: END.
Fique por dentro de todas as oportunidades e dicas internas seguindo as empresas de seus sonhos.
Comece a buscar vagas para receber atualizações e recomendações personalizadas.