See the attached pages from the MOAA National's "Council and Chapter Policies and Procedures Guide" for a chart on how to recognize by rank and address military personnel from the different services, both in formal writing, or when addressing documents, e.g., using rank abbreviations.