how to write pseudocode swap the content of two variables using a third variable

1 answer

1. Declare three variables A, B and C.
2. Assign values to variables A and B.
3. Display the original values of A and B.
4. Assign the value of A to C.
5. Assign the value of B to A.
6. Assign the value of C to B.
7. Display the new values of A and B.
8. End.

Pseudocode:
```
DECLARE A, B, C AS INTEGER
SET A = 5
SET B = 10
DISPLAY "Original Values: A=", A, " B=", B
SET C = A
SET A = B
SET B = C
DISPLAY "New Values: A=", A, " B=", B
```

Output:
```
Original Values: A=5 B=10
New Values: A=10 B=5
```