+ 1
Issue for var
Var a=10; Var b=20; Print a value 20 And second print b value 10 Not use thard var
2 Answers
+ 4
previous one will work in python.
u can try following logic:
a=a+b
b=a-b
a=a-b
this will work in all languages.
+ 3
for swapping values without using any extra variables:
a=10
b=20
a,b = b,a
print(a,b)
output:
20 10