Question: IN C++ Write a program to read a country name from file data.txt and display the abbreviation of the counter. If the counter name is

IN C++ Write a program to read a country name from file "data.txt" and display the abbreviation of the counter. If the counter name is one word, display the first 3 letters in uppercase. If country name are two words, display the first two letters of the first word and the first letter of the second word all in uppercase. If the counter name are three words, display the first letter of each word all in uppercase. Abbreviation of country name data.txt file Output United State America Costa Rica United State America.........USA Papua New Guinea Costa Rica........ .COR Saudi Arabia Papua New Guinea......PNG United Kingdom Saudi Arabia.... SAA Egypt United Kingdom..........UNK Egypt... EGY
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
