In our initial counting algorithm we had an assumption that the steps in which we count is a positive number.
If we look in our counting flowchart, we can see that in case that our Start number is less than our End number, and the Step value is not positive (0 or less) – our condition that checks if we passed the End number in our counting will never be true.
Our Counter value will never be increased, so it will always be less than (or equals to) the End number.
In case the Step value is negative – our program will endlessly print numbers that are getting smaller.
And in case the Step value is 0 – our program will endlessly print the Start number.
Follow the arrows and see what happens to the Counter value in case the Step value is negative or 0, and how the program will behave according to the flowchart.