Computer Science, asked by rakamohor2015, 10 hours ago

write a algorithm to swap two numbers without using the temporary variable.

Answers

Answered by bp5037043
0

Answer:

STEP 1: START.

STEP 1: START.STEP 2: ENTER x, y.

STEP 1: START.STEP 2: ENTER x, y.STEP 3: PRINT x, y.

STEP 1: START.STEP 2: ENTER x, y.STEP 3: PRINT x, y.STEP 4: x = x + y.

STEP 1: START.STEP 2: ENTER x, y.STEP 3: PRINT x, y.STEP 4: x = x + y.STEP 5: y= x - y.

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 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 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.

Answered by anushkagorawala
0

Answer:

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.

Similar questions