Rotating inverted pendulum c language program