I have two values: x_start and x_end. From time to time any value can be the highest.
How can I make a single for or while-loop to iterate through x in any directions to count either from x_start to x_end or the other way around?

Of course I can do it with an if statement and two for loops, but since I'm gonna fill the loop with lots of stuff, I'd like to smack it into one loop. Is that possible?

Code:
int step = 2;     // Can vary
int x_start = 10; // This could be 20
int x_end = 20;   // And this could be 10

for (int x = x_start; x<=x_end; x+=step) {
  printf ("x = %d\n", x);
}