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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!