algorithm for numbers 0 to 99