-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path5_permutation.html
More file actions
33 lines (24 loc) · 942 Bytes
/
5_permutation.html
File metadata and controls
33 lines (24 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html>
<head>
<title>Permutation de 2 variables</title>
<meta charset="UTF-8">
<style>
p{
font-size: x-large;
}
</style>
</head>
<body>
<h1>Permutation de 2 variables</h1>
<p>Ecrivez un programme 'permutation.js' ayant initialement le contenu suivant:</p>
<p>var nombre1 = 5;</p>
<p>var nombre2 = 3;</p>
<p>// Tapez votre code ici (sans rien modifier d'autre !)</p>
<p>console.log(nombre1); // Doit afficher 3</p>
<p>console.log(nombre2); // Doit afficher 5</p>
<p>A l'endroit indiqué par un commentaire, ajoutez le code nécessaire pour inverser les valeurs des deux variables.</p>
<p style='border: 1px solid; background-color: lightgray'>Il existe plusieurs solutions à cet exercice. <br />Astuce : vous n'êtes pas limité(e) à l'utilisation de deux variables.</p>
<script type="text/javascript" src="5_permutation.js" ></script>
</body>
</html>