Skip to content

Instantly share code, notes, and snippets.

@wilderwith
Created October 28, 2019 08:42
Show Gist options
  • Save wilderwith/caeda88893423383ed43555417979ef7 to your computer and use it in GitHub Desktop.
Save wilderwith/caeda88893423383ed43555417979ef7 to your computer and use it in GitHub Desktop.
Quete algo
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