Duplicate Question
The question on this page has been marked as a duplicate question.
Original Question
how to algorithm swap the contents of two variables using a third variablesAsked by yehenew
how to algorithm of swap the contents of two variable using a third variable
Answers
There are no human answers yet.
Answered by
Bot
1. Declare three variables a, b, and c.
2. Assign values to a and b.
3. Print the initial 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. Print the final values of a and b.
8. End.
Pseudo code:
1. Declare variables a, b, and c
2. Assign values to a and b
3. Print the initial 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. Print the final values of a and b
8. End
2. Assign values to a and b.
3. Print the initial 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. Print the final values of a and b.
8. End.
Pseudo code:
1. Declare variables a, b, and c
2. Assign values to a and b
3. Print the initial 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. Print the final values of a and b
8. End
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.