hey I’m looking for are clean solution to this problem:

i start the loop with i = 0 in the second loop step the i = 1, then i = -1 and then i = 2 ect.
how to programm this with a for loop in a clean way?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you don’t mind having the inner loop appear 3 times:
2 times with an
if:single time but with an ugly expression: