The training program for cartographers and surveyors studying the basics of C++ programming was developed. The program solves the inverse geodesic task. The distance (horizontal equivalent) between two points and the grid angle of the line connecting these points are calculated using the plane rectangular coordinates of points. The horizontal equivalent is displayed on the screen with an accuracy of 1 mm. The grid angle is displayed with an accuracy of 1 angular second. The first version of the program demonstrates the use of the pointers to transfer parameters to a function and return the calculated values of degrees, minutes and seconds of the grid azimuth. In the second version of the program the global variables are used to work with the grid azimuth values separately in degrees, minutes and seconds. It also discusses the reasons why the first version of the program is preferable. Usage of the trigonometric function of the arctangent for processing angular values in the range from 0 to 360 degrees is also demonstrated. The programs developed illustrate solution of the inverse geodetic task based on the application of procedural programming technology.