please suppose this is not a school task !
just tell me this algorithm satisfy "Progress" or not ?

thanks Mr Wysota