I need a rotating and translating program

I need a program which demonstrates translate and rotate functions in opengl. Coordinates should be in 3d. But the shape should be 2d. When clicking left button of the mouse there should appear two options: “1.translate” “2.rotate”. When clicking those menus it should translate or rotate a triangle. Can you help me with that program?

No offense, but is that homework or paid work ?
http://www.opengl.org/sdk/docs/tutorials/
http://nehe.gamedev.net/
Read any tutorial about GLUT menus.
Then any tutorial about translations.
Then come back if you have specific problems.