logo

Crowdly

Browser

Add to Chrome

Procédure premier (a : entier) Variables  test : booleen                 d : e...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Procédure premier (a : entier)

Variables test : booleen

                d : entier

Debut

     test ←  vrai

     d ←  2

Tantque ( d <= a/2  et  test == vrai ) Faire

        Si (a mod d == 0) Alors

              test ← Faux

        Sinon

                d ←  d + 1

        FinSi

FinTantque

Si ( test == vrai) Alors

        Ecrire (a, "est premier")

Sinon

        Ecrire (a, "n'est pas premier")

FinSi

Fin Procédure

--------------------------------------------------

Dans la procédure premier, à quoi sert la variable test ?

0%
0%
0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on moodle.e-polytechnique.ma?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome