Last active
December 15, 2015 06:09
-
-
Save hanophora/5214020 to your computer and use it in GitHub Desktop.
Un programme Plic (Petit Langage d'Introduction à la Compilation) qui crée une boucle pour démoniaque. Ou pas.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
programme chateau_for { | |
entier a b i tmp; | |
a := 10; | |
b := 20; | |
pour i dans a .. b repeter { | |
ecrire i; | |
si(i > 11 || a > b) alors { | |
tmp := a; | |
a := b; | |
b := a; | |
} finsi | |
} | |
} |
Possibilité n°2 : la fin de la boucle lorsque fin < deb
10
11
Possibilité n°3 : i s'en fout et se souvient des bornes initiales
10
11
12
13
14
15
16
17
18
19
20
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Possibilité n°1 : la boucle infinie (i essaye toujours de se rapprocher de sa première borne)
10
11
12
11
12
11
...