The program getmac reads the definition of a wing from an arbitrary number of chords, each defined by its spanwise location, longitudinal position of its leading edge, and its length. The program reads the input file and prints the area, length of MAC, y of MAC, xle of MAC, xte of MAC, and x of c/4 of MAC. This is an example of a calculation that is somewhat tedious if there are multiple segments to the wing.
I have included five examples of the use of getmac for wings of various complexity. You may examine these cases at www.pdas.com/macex1.html. As always, your comments are welcome and appreciated.