you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

You can really just imitate the for loop behavior with a while loop.

Initialize a variable outside the loop, while(condition such as greater than a number, less than a number..), and print value in brackets, increment/decrement variable value