-
-
Save bastienapp/57853fa92587647fedaa3e43bed7dec2 to your computer and use it in GitHub Desktop.
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
Début acheterBonbons (réel argent, réel prix) | |
Si argent <= 0 OU prix <= 0 | |
retourner 0 | |
Sinon | |
entier bonbons ← 0 | |
Tant que (argent - prix) >= 0 | |
bonbons ← bonbons + 1 | |
argent ← argent - prix | |
Fin Tant que | |
retourner bonbons | |
Fin Si | |
Fin acheterBonbons |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment