Rotation problems

Hello, I have a question about rotation, have been trying for hours and still no idea…
If I have object for example | and I want it to first move to the right / and then to the left \ so it would be | / | \ etc.
How to even get started with that thing:(

You should try using glRotatef (float), glRotatei (int), or glRotated (double).

I would suspect that it would rotate according to your diagram.

| -> / -> \ -> | then it loops.