Problem 2 Solution
Write a C++ program named acronym.cpp. (You may want to wait until after Thursday’s closed lab to work on this problem) The acronym for a given string is formed by combining the first letters from a series of words, as in this example: "self contained underwater breathing apparatus" !"SCUBA". Your program generates and displays the acronyms for each of the strings in a data file named “Acronym.dat”. The output of your program should be of the following format: Self contained underwater breathing apparatus ! SCUBA White anglo saxon protestant ! WASP … North Atlantic Treaty Organization !NATO The strings in the data file may have mixed upper and lower letters. You may assume that no hyphen and underscore, and no punctuation marks is present in the data file. The acronyms generated should all be in upper case letters. Your program is required to have at least one user-define function.
This function takes one string as input and returns the acronym corresponding to that string. Download the data file from the course web page, and place the file in the project directory. Or, you can copy it into your project directory with command: cp ~cen/data/Acronym.dat codelite-workspace-name/project-name/ Documentation and program indentation and formatting
• Write the program with indentation and formatting style as discussed in class, and given in the program requirement : IF IN NEED OF part 1 please INBOX
You'll get 1 file (2.3MB)