Draw a flowchart to interchange the value of two variables by using a third variable.
Answers
Answered by
3
Explanation:
Algorithm for Swapping two numbers using third variable:
Declare a variable a,b and c as integer; Read two numbers a and b; c=a; a=b; b=a; Print a and b.
STEP 1: START STEP 2: ENTER A, B STEP 3: PRINT A, B STEP 4: A = A + B STEP 5: B= A - B STEP 6: A =A - B STEP 7: PRINT A, B STEP 8: END.
mark as braileast
Similar questions