toreplay.blogg.se

Cop4530 wordify github
Cop4530 wordify github






cop4530 wordify github

When printing characters, use ‘t’ for tab and ‘n’ for newline. You should make the outputs of your program match this sample executable.

Cop4530 wordify github code#

  • An example executable code of the program is provided to you (see below).
  • When two words (or numbers) occur the same number of times, the word (or number) that occurs earlier in the input should be considered as being used more frequently.
  • When two characters occur the same number of times, the character with the smaller ASCII value should be considered as being used more frequently.
  • The characters, numbers and words should be printed in descending order based on the number of times they are used.
  • Since words are case insensitive, the program should only output the words in lower case.
  • The program should then output the ten most used characters, the ten most used numbers, and the ten most used words, along with the number of times each of these characters/numbers/words are used.
  • Your program should track the number of times each word, number, and character appears.
  • Numbers are separated by any non-digit characters.
  • cop4530 wordify github

  • Words are separated by any non-letter characters.
  • For example, number “001” is different from number “1”.

    cop4530 wordify github

    Different sequences represent different numbers.Note that both words and numbers can be of length of 1, that is, contain one letter or one digit, respectively.A number is defined as any consecutive sequence of digits (‘0’.’9′).Words are case insensitive (“AA”, “Aa”, “aA”, and “aa” are the same).A word is defined as a consecutive sequence of letters (‘a’.’z’ or ‘A’.’Z’).Write a program that will read input (from standard input) until end of input is reached (“end of file”), which will count the number of times each word, number, and character appears in the input.Statement of Work: Implement a program that collects the statistics of word, number, and character usage in a file (redirected as the standard input). Practice selecting and making use of appropriate STL containers and algorithms to perform tasks.








    Cop4530 wordify github