How to rotate text in OPENGL

I want to rotate text to 180 degree. In keyboard when I press left or right key the text will start to rotate to left or right. when rotation reach to 90 or -90 text will print reverse side for example "he to eh". How to rotate and I will get this type of output. I used glutBitmapCharater to print text.
I want this type of Output
Capture1

You didn’t actually ask a question.

Please read the Forum Posting Guidelines.