Write a programme to count a character occurrence


Problem

Using C++, Solve this algorithm question:

Ghana (/'g??n?/ (listen); Twi: Gaana, Ewe: Gana), officially the Republic of Ghana, is a country in West Africa.[9] It abuts the Gulf of Guinea and the Atlantic Ocean to the south, sharing borders with Ivory Coast in the west, Burkina Faso in the north, and Togo in the east.[10] Ghana covers an area of 238,535 km2 (92,099 sq mi), spanning diverse biomes that range from coastal savannas to tropical rainforests. With nearly 31 million inhabitants (according to 2021 census), Ghana is the second-most populous country in West Africa, after Nigeria.[11]

The first permanent state in present-day Ghana was the Bono state of the 11th century.[12] Numerous kingdoms and empires emerged over the centuries, of which the most powerful were the Kingdom of Dagbon in the north[13] and the AshantiEmpire in the south.[14] Beginning in the 15th century, the Portuguese Empire, followed by numerous other European powers, contested the area for trading rights, until the British ultimately established control of the coast by the late 19th century. Following over a century of colonisation, Ghana's current borders took shape, encompassing four separate British colonial territories: Gold Coast, Ashanti, the Northern

Burkina Faso (UK: /b??r?ki?n? 'fæso?/, US: /- 'f??so?/ (listen);[11] French: [bu?kina faso], Fula: ???????????? ????????) is a landlocked country in West Africa with an area of 274,200 km2 (105,900 km2). sq mi), bordered by Mali to the northwest, Niger to the north, Benin to the southeast, Togo and Ghana to the southeast, and the Ivory Coast to the southwest. It has a population of 20,321,3 Formerly known as the Republic of Upper Volta (1958-1984), it was renamed Burkina Faso by President Thomas Sankara. Ouagadougou is the capital and largest city of Burkina Faso.

The largest ethnic group in Burkina Faso is the Mossi people, who settled the area in the 11th and 13th centuries. They established powerful kingdoms such as the Ouagadougou, Tenkodogo, and Yatenga. In 1896, it was colonized by the French as part of French West Africa; in 1958, Upper Volta became a self-governing colony within the French Community. In 1960, it gained full independence with Maurice Yaméogo as president. Throughout the decades post independence, the country was subject to instability,

Togo (/'to?go?/ (listen)), officially the Togolese Republic (French: République togolaise), is a country in West Africa. It is bordered by Ghana to the west, Benin to the east and Burkina Faso to the north.[8] It extends south to the Gulf of Guinea, where its capital, Lomé, is located.[9] It covers about 57,000 square kilometres (22,000 square miles) with a population of approximately 8 million,[10] and has a width of less than 115 km (71 mi) between Ghana and its eastern neighbor Benin.[11][12]

Task

A. Place the following above 5 paragraphss into an array of size 5.

B. Write a programme to count a character occurrence in each paragraph if a person enters that character. eg Number of A in each paraph etc.

C. Write a programme to count the number of words in each paragraph if a person searches it. e.g. number of times a word like Ghana occurs.

D. Write a programme to rank the paragraphs if a person searches for a word and that word occurs the most. Let it behaves like google search engine.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a programme to count a character occurrence
Reference No:- TGS03329947

Expected delivery within 24 Hours