Created
October 28, 2019 08:42
-
-
Save wilderwith/caeda88893423383ed43555417979ef7 to your computer and use it in GitHub Desktop.
Quete algo
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
Début acheterBonbons (réel argent, réel prix) | |
Si argent < 0 OU prix > argent | |
retourner 0 | |
Sinon | |
entier bonbons ← 0 | |
Tant que (argent - prix) > 0 | |
bonbons ← bonbons + 1 | |
argent ← argent - prix | |
Fin Tant que | |
retourner bonbons | |
Fin Si |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment