Exercices - WOA - Intro JS

stardisblue
16.5K views

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

Manipulation de nombres

Considérons l’algorithme suivant :

Soit un entier naturel A.

Tant que A est différent de 1, exécuter les instructions suivantes :

Si A est impair, alors remplacer A par 3 x A + 1
Sinon remplacer A par A/2
Ajouter A dans un tableau
Retourner le tableau de A
Écrire l'algorithme.
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content