1. Determine the specific variable which will be responsible for the termination of the algorithm
(i.e., key variable).
2. Determine the value of the key variable that will terminate the algorithm (i.e., base value).
3. Ensure that the key variable always approaches the base value.
4. When the key variable equals the base value, the algorithm must terminate.
Do'stlaringiz bilan baham: