Comment échanger les valeurs de deux variables ?
Avec une variable temporaire :
x, y, tmp est un nombre x vaut 1 y vaut 2 tmp vaut x x vaut y y vaut tmp affiche x + ' ' + y // 2 1
Avec une variable temporaire :
x, y, tmp est un nombre x vaut 1 y vaut 2 tmp vaut x x vaut y y vaut tmp affiche x + ' ' + y // 2 1