Strict Standards: Redefining already defined constructor for class wpdb in /homepages/4/d219449114/htdocs/wordpress/wp-includes/wp-db.php on line 56

Deprecated: Assigning the return value of new by reference is deprecated in /homepages/4/d219449114/htdocs/wordpress/wp-includes/cache.php on line 36

Strict Standards: Redefining already defined constructor for class WP_Object_Cache in /homepages/4/d219449114/htdocs/wordpress/wp-includes/cache.php on line 384

Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl($output) in /homepages/4/d219449114/htdocs/wordpress/wp-includes/classes.php on line 541

Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl($output) in /homepages/4/d219449114/htdocs/wordpress/wp-includes/classes.php on line 541

Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el($output) in /homepages/4/d219449114/htdocs/wordpress/wp-includes/classes.php on line 541

Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el($output) in /homepages/4/d219449114/htdocs/wordpress/wp-includes/classes.php on line 541

Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el($output) in /homepages/4/d219449114/htdocs/wordpress/wp-includes/classes.php on line 560

Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl($output) in /homepages/4/d219449114/htdocs/wordpress/wp-includes/classes.php on line 659

Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl($output) in /homepages/4/d219449114/htdocs/wordpress/wp-includes/classes.php on line 659

Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el($output) in /homepages/4/d219449114/htdocs/wordpress/wp-includes/classes.php on line 659

Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el($output) in /homepages/4/d219449114/htdocs/wordpress/wp-includes/classes.php on line 659

Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el($output) in /homepages/4/d219449114/htdocs/wordpress/wp-includes/classes.php on line 684

Deprecated: Assigning the return value of new by reference is deprecated in /homepages/4/d219449114/htdocs/wordpress/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /homepages/4/d219449114/htdocs/wordpress/wp-includes/theme.php on line 540
os-studio » Blog Archive » Algorithmique - La machine à café
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 627

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 691

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 692

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 627

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 691

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 692

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 627

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 691

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 692

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 627

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 691

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 692

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 627

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 691

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 692

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 627

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 691

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 692

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 627

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 691

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/kses.php on line 692

Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/functions.php on line 12

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/functions.php on line 21

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/functions.php on line 23

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/functions.php on line 25

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/functions.php on line 26

Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/functions.php on line 12

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/functions.php on line 21

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/functions.php on line 23

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/functions.php on line 25

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/functions.php on line 26

Algorithmique - La machine à café


Strict Standards: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/functions.php on line 12

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/functions.php on line 21

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/functions.php on line 23

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/functions.php on line 25

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/functions.php on line 26
octobre 12th, 2007 by admin

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /homepages/4/d219449114/htdocs/wordpress/wp-includes/formatting.php on line 82

Cas de la machine à café:

- distributeur de café
- boissons à 1,20 €
- pièces acceptées : 0,05 € - 0,10 € - 0,20 € - 0,50 € - 1,00 € - 2,00 €

Objectifs :

- Indiquer le fonctionnement de l’appareil
- cas limites : monnaie non disponible
- optimisation de la monnaie en stock

Résolution :

Définition des variables :

a = 0,05
b = 0,10
c = 0,20
d = 0,50

Somme maxi insérer dans la machine 2 €

x = la somme payer - 1,20 (prix du café)

Algo :

TantQue( x >= a)

Si ( x >= d ) Et qu’il reste des pièces d dans la machine
Alors x = x - d et on rend une pièce d

SinonSi ( x >= c ) Et qu’il reste des pièces c dans la machine
Alors x = x - c et on rend une pièce c

SinonSi ( x >= b ) Et qu’il reste des pièces b dans la machine
Alors x = x - b et on rend une pièce b

SinonSi ( x >= a ) Et qu’il reste des pièces a dans la machine
Alors x = x - a et on rend une pièce a

FinTantQue

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.