kwark Posted March 14, 2021 Share Posted March 14, 2021 salut a tous !!! pk dans cet exercice on doit faire fixerL2 a dans liste (liste) ???? pk on peut pas faire directement fixer L2 a 0 ? http://www.noelshack.com/2021-10-7-1615739687-blocky.png Merciii Quote Link to comment Share on other sites More sharing options...
Ancien du Bureau Sans-Visage Posted March 14, 2021 Ancien du Bureau Share Posted March 14, 2021 Coucou, Au fait ça marcherait bien pour la premiere ligne. C'est à dire qu'on commence avec une liste de zéro, disons 0 0 0 0 0 A la fin de la première boucle, on aura par exemple 1 0 1 1 0 Sauf que là, imaginons qu'il y ai de la peinture partout, si tu prends en fixant à 0, tu obtiens: 1 1 1 1 1 Au lieu d'avoir 2 1 2 2 1 Tu comprends ? Quote Link to comment Share on other sites More sharing options...
kwark Posted March 14, 2021 Author Share Posted March 14, 2021 Il y a 2 heures, DuTACKauTac a dit : Coucou, Au fait ça marcherait bien pour la premiere ligne. C'est à dire qu'on commence avec une liste de zéro, disons 0 0 0 0 0 A la fin de la première boucle, on aura par exemple 1 0 1 1 0 Sauf que là, imaginons qu'il y ai de la peinture partout, si tu prends en fixant à 0, tu obtiens: 1 1 1 1 1 Au lieu d'avoir 2 1 2 2 1 Tu comprends ? salut !!! ca devrait marcher non ? on a la condition si obtenir la valeur ==2 Quote Link to comment Share on other sites More sharing options...
Ancien du Bureau Solution Sans-Visage Posted March 14, 2021 Ancien du Bureau Solution Share Posted March 14, 2021 il y a une heure, PassOuPACES a dit : on a la condition si obtenir la valeur ==2 Sauf que justement si tu remets à 0 avant d'ajouter un, tu obtiendras pas de deux, tu vois ce que je veux dire ? Quote Link to comment Share on other sites More sharing options...
kwark Posted March 15, 2021 Author Share Posted March 15, 2021 @DuTACKauTac Merciii Sans-Visage 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.