What I'm asking about is: What is done with the words to be counted?
How are the words read into the program and where does the program save them?
Once they are saved some place, the program can...
Type: Posts; User: Norm
What I'm asking about is: What is done with the words to be counted?
How are the words read into the program and where does the program save them?
Once they are saved some place, the program can...
Is the program given a list of words to search for?
How does the program get that list of words and what does it do with the list?
Have you written the code to do that yet?
--- Update ---
Be...
Where are the words that are to be counted? How does the program put them there?
I assume the words to be counted have been saved somewhere before the search is made through the text to count the...
Break the process down into simple, single steps. Your suggestion has too many hidden steps.
Give a line with several words, what needs to be done first?
How would you do it manally? Given some words on a line what steps need to be done to check if any of the words are in another list somewhere?
If the program is able to get a line of words, how about the next step:
check if any of the words you've read in is one of those being searched for.
Work on one problem at a time:
can the program do this: read in a handful of words on one line.
--- Update ---
First you need to properly format the posted code. Nested statements need to be...
What part are you having problems with?
trying to read in a handful of words on one line.
check if any of the words you're reading in is one of those.
If it is, you count it
First you need to properly format the posted code. Nested statements need to be indented 3-4 spaces.
Not all statements should start in the first column.
Which part of the assignment are you...