摘要 |
PROBLEM TO BE SOLVED: To make it possible to be strengthened to condition change and to enhance flexibility by deciding one amount as a target reserve amount among plural amounts to be obtained by combining each denomination within a range of the stored number and deciding the number of reserve coins of each denomina tion on condition that it is matched with the target reserve amount. SOLUTION: The total sum of the decided number of reserve coins Y [i] of each denomination is calculated and it is substituted for a variable XX (S600). A deviation B between the target reserve amount X and the number W by denomination for deciding the target deposit amount is calculated by subtracting a value of a number XX from the calculated target reserve amount X (S602). After that, an initial value of a variable (i) is set as, for example, 500 of a 500 yen coin (S604). The calculated deviation B is divided by the variable (i) and its result is substituted for a variable D (S606). The variable D is the number of 500 yen coins to be required for converging the deviation B into zero. When the deviation B becomes zero as a result of a processing, the target deposit amount X is achieved by the decided number of reserve coins Y [i] which is presently allocated.
|