-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# do while | ||
programme AfficherNombres | ||
début | ||
avec n, i : entier | ||
|
||
afficher "n = " | ||
saisir n | ||
|
||
i <- 1 | ||
répéter | ||
afficher i, "\n" | ||
i <- i + 1 | ||
tant que i <= n | ||
fin AfficherNombres |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# while | ||
programme AfficherNombres | ||
début | ||
avec n, i : entier | ||
|
||
afficher "n = " | ||
saisir n | ||
|
||
i <- 1 | ||
tant que i <= n faire | ||
afficher i, "\n" | ||
i <- i + 1 | ||
fin faire | ||
fin AfficherNombres |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Contrôler des données saisies. | ||
programme ContrôleSaisir | ||
début | ||
avec var : entier | ||
|
||
afficher "En utilisant tant que :\n" | ||
saisir var | ||
tant que var != 1 faire | ||
afficher "var (doit être = 1) -> " | ||
saisir var | ||
fin faire | ||
|
||
afficher "En utilisant répéter :\n" | ||
répéter | ||
afficher "var (doit être = 1) -> " | ||
saisir var | ||
tant que var != 1 | ||
fin ContrôleSaisir |