Write a program to count the number of times certain words occur in a text.
A number of lines of text without punctuation marks. Followed by a line with five dashes (-----
) and then a number of
words of which you have to count how often they occur in the text. Be careful with words that start with a capital
letter, you should not count them separately! The input ends with and empty line.
The number of times each of the requested words occurs.
Input:
Alice was beginning to get very tired of sitting by her sister on the
bank and of having nothing to do once or twice she had peeped into
the book her sister was reading but it had no pictures or
conversations in it and what is the use of a book thought Alice
without pictures or conversations
-----
reading
or
what
pictures
Output:
1
3
1
2