Computer Science, asked by kayehod780, 3 months ago

DEVELOP A FLOWCHART TO INTERCHANGE TWO NUMBERS (SWAPPING).

Answers

Answered by hitanshrishah
0

Answer:

Algorithm : a.) using a third variable

Step 1 : Start

Start 2 : READ num1, num2

Start 3 : temp = num1

Start 4 : num1 = num2

Start 5 : num2 = temp

Start 6 : PRINT num1, num2

Start 7 : Stop

Algorithm : b.) without using a third variable

Step 1 : Start

Start 2 : READ num1, num2

Start 3 : num1 = num1 + num2

Start 4 : num2 = num1 - num2

Start 5 : num1 = num1 - num2

Start 6 : PRINT num1, num2

Start 7 : Stop

Answered by adityasinghchandauli
0

Answer:

Algorithm. Lets find out how should we draw a solution step-by-step − START Var1, Var2, Temp Step 1 → Copy value of Var1 to Temp Step 2 → Copy value of Var2 to Var1 Step 3 → Copy value of Temp to Var2 STOP.

Similar questions