@groundFungus sorry I didn't make my requirement clear earlier.
I need my stepper motor to stop at regular intervals in a complete rotation based on a user input.
for input as 4 it should stop at 0 50 100 150 200 over and over again
for input as 6, it will have to stop at 0 33 66 100 133 166 200 (approximating the decimal places)
for this purpose I believe I will have to avoid using the relative method as it could lead to creation of cummilative errors after a few rotations. That is why I went for the array method for chosing the positions. But even then I feel like i am getting an output which is not according to the code. Coulld you tell me if i was wrong anywhere in my code. ( the delay of 80ms was a silly move to get a visual indication of the start of next cycle).