Write an algorithm to swap the values of two variables?

1 answer

Answer

1237152

2026-03-16 16:05

+ Follow

x=9;

y=4;

x=x+y; #x=13;y=4;

y=x-y; #y=13-4=9;

x=x-y; #x=13-9=4;

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.