Welcome Guest.


C program problem solving

Asked by: Carl 206 views IT June 9, 2018

Solve with C language, thank you all!

Count the number of occurrences of each word for an English sentence. The user is prompted to select (1: Arrange in descending order of occurrence number, 2: Arrange in ascending order of word dictionary order), display the sorting result, and convert the word into lowercase uniformly, and refer to the output format as an example. The possible punctuation marks in English sentences are:,.;:

Requirements: 1 Exclude commas, semicolons, colons behind the word

          2 Cases are not case sensitive. 3 English sentences are written directly in the program.

For example, the English sentence for the president told the audit authorities to keep their thoughts and actions in line with the CPC Central Committee, resolutely safeguard the centralized and unified leadership of the committee and implement the requirements of the committee.

The program output is: in order of descending order of occurrence: the,7and,3committee,3of,2actions,1audit,1authorities,1central,1centralized,1cpc,1implement,1in,1keep,1leadership,1line,1president, 1requirements,1resolutely,1safeguard,1their,1thoughts,1to,1told,1unified,1with,1

0 Answers